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.
>From: Morten Pedersen <address@hidden> >Subject: Ncvar::rec_size typo >Organization: ? >Keywords: 200101091314.f09DECo20971 netCDF Ncvar Hi Morten, > A little correction for netcdf 3.5 > > > Line 686 in src/cxx/netcdf.cpp (in NcVar::rec_siz) > should read > delete [] edge; > instead of > delete edge; > in order to get purify to shut up, and to conform to all deletes of edge > in the NcVar class > > The code looks the same in 3.4 and 3.6beta6. > > A corrected version of NcVar::rec_siz > looks like > > long NcVar::rec_size(void) { > long size = 1; > long* edge = edges(); > for( int i = num_dims()-1 ; i>0 ; i--) > size *= edge[i]; > delete [] edge; // added brackets > return size; > } Thanks very much for the fix, I've incorporated it into the netCDF-3.5 release, which I hope to make available in February. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu