Re: Memory leak
Posted by
Gib Bogle on
URL: http://imagej.273.s1.nabble.com/Memory-leak-tp3700430p3700441.html
Albert, the behaviour I'm seeing is creating much more lost memory than
this. The amount of memory lost is about twice the size of the tif
file. I should emphasize that this occurs when doing nothing else other
than File>Open and Image>Color>RGB Split. That is, immediately after
starting ImageJ:
Plugins>Utilities>Monitor Memory
File>Open test.tif
Image>Color>RGB Split
close 3 image windows
Memory usage is now about 10 MB. Repeat the above steps and 10 MB is
added to the memory usage each time (when test.tif is 4.7 MB).
Gib
Albert Cardona wrote:
> Hi Gib,
>
> I can confirm that "RGB Split" is causing a leak. I've been processing
> stacks for about 2 hours using precisely the RGB Split a lot, and I
> can see some unreleased 18 Mb of memory (compared to the about 2 Gb
> worth of images I've opened, it's rather small, so it may be sneaky to
> find). This looks to me like a bug introduced in the late
> memory-saving routines involving images, but I may be wrong.
>
> Have you tracked the exact code lines responsible?
>
> I'm using java 1.6.0 on linux x86
>
> Albert
>
>>
>> Thanks Albert, but I've tracked the problem to one of ImageJ's
>> functions, Image>Color>RGB Split, so it isn't related to my plugin
>> code. I have ImageJ version 1.37v, Java version 1.5.0_11, Windows
>> 2000 Service Pack 4. Every time I open a 4.7 MB tif file, do RGB
>> Split, then close the 3 images, the memory usage increases by about
>> 10 MB, and this memory is never freed.
>