Re: Memory leak in RadialDataset?

Don, do you have caching on?

Anyway, make sure caching is off (NetcdfFileCache.disable()).
Yuan, can you check your code for anything obvious?

Jeff McWhirter wrote:

We seem to have a memory leak in RadialDataset when we create an RHI

Here is the scenario. I run the following loop, keeping around the references to the adapter in the tmp list so they don't get collected. The getData call reads the RHI or the sweep from the RadialDatasetSweep. The clear method in the adapter clears internal references.

       while(true) {
         CDMRadarAdapter adapter = new CDMRadarAdapter(this, file);
         adapter.getData(dataChoice, subset,

If I run this and do not clear the reference to the RadialDatasetSweep that it holds then I get a big memory leak. If I clear the reference then no leak. So, this tells me that somewhere in the RadialDatasetSweep world there a retained reference to data. Is there any caching going on here on purpose? or is there a stray pointer
to some data?


  • 2007 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: