[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 20030829: memory leak in the netcdf C++ interface?



>To: address@hidden
>cc: address@hidden
>From: V Lakshmanan <address@hidden>
>Subject: memory leak in the netcdf C++ interface?
>Organization: OU
>Keywords: 200308291434.h7TEYmLd014599 netCDF C++

Hi Lak,

> In the netcdf-c++ interface (I'm using version
> 3.5.1-beta12), is there a memory leak in that
> this variable (line 1081)
>    cur_rec = new long[MAX_NC_DIMS];
> is not deleted in the destructor? Variable
> "the_cur" is deleted okay.
> 
> We are seeing programs grow slowly, and after
> checking memory usage, found that some memory allocated
> in init_cur() was not released. I have a
> feeling it is due to the NcVar's created whenever
> I open new files.

Yes, you're right, this is fixed in netCDF version 3.5.1-beta13,
available from:

  ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.5.1-beta13.tar.Z

Please let us know if this doesn't fix the problem.

--Russ