NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
In netcdf 2.3.2 patch 4 (C++ interface), the destructor for NcFile has been made protected: (code from netcdf.hh) (parts of NcFile class deleted for brevity) protected: // Protected destructor used to make this an abstract base class. virtual ~NcFile( void ); int the_id; int in_define_mode; NcDim** dimensions; NcVar** variables; NcVar* globalv; // "variable" for global attributes This makes deleting an NcFile object impossible from any outside application. I have never seen a protected destructor before. Why was this done? It is quite possible that I'm missing something, so if I am, please tell me. Also, the comment just above the destructor definition does not seem to make sense. Unless I'm wrong, if you want to make an abstract base class, wouldn't it need to be virtual ~NcFile( void )=0 ? If I'm wrong about all of this, please tell me how I can delete a NcOld/NewFile. I'm at a loss. thanks, ----------------------------------------------------------------------------- | | | _ | Tom Glaess ______________|_( )_|______________ tgl@xxxxxxxxxxxx o +|+ [ ( o ) ] +|+ o *[_]---[_]* -----------------------------------------------------------------------------
netcdfgroup
archives: