Login  Register

Re: Imagej and Java 1.8

Posted by Rasband, Wayne (NIH/NIMH) [E] on Dec 10, 2015; 4:06pm
URL: http://imagej.273.s1.nabble.com/imagej-and-Java-1-8-tp5015143p5015206.html

> On Dec 06, 2015; 5:24AM, Aryeh Weiss wrote:
>
> I have noticed that when using Fiji with Java 1.8, the response
> gradually gets slower, until eventually
> I need to restart Fiji. The issue seems to be connected to screen
> updates, but I cannot pin it down to a single item, although the ROI
> Manager seems to often be involved.
> For example, toggling "Show All" in the ROI manager tends to become
> really slow.
>
> Now, the memory monitor shows 6.8GB in use, although I have very little
> open. Double clicking on the Fiji window does not appear to have forced GC.

I can reproduce this memory leak using the following Python script. The memory used by the 1GB image created by the script is not reclaimed when you click in the “Memory” window. Jython appears to be holding a reference to 'ip' after the script ends. Adding "ip=None" to the script does not help. One workaround is to use JavaScript.

-wayne

IJ.doCommand("Monitor Memory...");
img = IJ.createImage("Untitled","8-bit",32768,32768,1);
ip=img.getProcessor()
img.close()


> I am just adding this update in the hope that these observations may
> prove useful to the people who know more about Fiji and Java 1.8 than I.
> If there are addition things that I can do to provide useful data for
> this, please let me know.
>
> --aryeh


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html