ADMB Documentation  11.1.2274
 All Classes Files Functions Variables Typedefs Friends Defines
df1b2f17.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: df1b2f17.cpp 1919 2014-04-22 22:02:01Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 #include <df1b2fun.h>
00016 fixed_smartlist::~fixed_smartlist()
00017 {
00018   delete [] true_buffer;
00019   true_buffer=0;
00020   off_t pos=lseek(fp,0L,SEEK_END);
00021   int on1=-1;
00022   if ( (on1=option_match(ad_comm::argc,ad_comm::argv,"-fsize"))>-1)
00023   {
00024     if (ad_comm::global_logfile)
00025     {
00026       *ad_comm::global_logfile << "size of file " << filename
00027         << " = " << pos << endl;
00028     }
00029   }
00030   close(fp);
00031 #if defined (_MSC_VER)
00032   remove(filename);
00033 #else
00034   unlink(filename);
00035 #endif
00036 }
00037 
00042 fixed_smartlist2::~fixed_smartlist2()
00043 {
00044   delete [] true_buffer;
00045   true_buffer=0;
00046   off_t pos=lseek(fp,0L,SEEK_END);
00047   int on1=-1;
00048   if ( (on1=option_match(ad_comm::argc,ad_comm::argv,"-fsize"))>-1)
00049   {
00050     if (ad_comm::global_logfile)
00051     {
00052       *ad_comm::global_logfile << "size of file " << filename
00053         << " = " << pos << endl;
00054     }
00055   }
00056   close(fp);
00057 #if defined (_MSC_VER)
00058   remove(filename);
00059 #else
00060   unlink(filename);
00061 #endif
00062 }