This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>To: address@hidden >From: "Sjaak Verdoold" <address@hidden> >Subject: memory leaks C++ interface and borland libraries >Organization: Delft University of Technology (TNW-DCT) >Keywords: 200309161653.h8GGrXLd003653 netCDF C++ Hi Sjaak, > just a little email concerning 2 things: > first I think there is a memory leak in the C++ interface for NetCDF. > This leak is in the destructor of the NcVar class I think. It can be > fixed by changing the destructor from > NcVar::~NcVar( void ) > { > delete[] the_cur; > delete[] the_name; > } > > to > > NcVar::~NcVar( void ) > { > delete[] the_cur; > delete[] the_name; > delete[] cur_rec; > } Thanks. This change is incorporated into ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.5.1-beta13.tar.Z > second I created static libraries for both the C and the C++ interface of > NetCDF for use with Borland compilers (Borland C++Builder 6 but should > also work with others). Maybe those libraries might be of use for someone > else. Yes, we occasionally have questions from people who have trouble with Borland compilers when building netCDF libraries from source. If you have static libraries you could contribute, we would be grateful to get a URL from where they could be downloaded or the actual libraries to make available from our "contributed software" directory at ftp://ftp.unidata.ucar.edu/pub/netcdf/contrib/ Currently we have a "borland" folder there, but the libraries are from 1994! --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu/staff/russ