Re: Flush/clear memory in ImageJ/Fiji
Posted by
dscho on
URL: http://imagej.273.s1.nabble.com/Flush-clear-memory-in-ImageJ-Fiji-tp3682491p5001997.html
Hi Yael,
On Mon, 4 Mar 2013, Yael Grossman wrote:
> I have been having a similar problem using the Foci 3D counter in
> ImageJ. I try to run it on a tif virtual stack of images, but after
> about the fourth, I start getting an error message about java heap
> space. Then I close Java and have to wait about 30-45 min before the
> heap space resets. I am closing each image after I finish with the foci
> counter. Since I have to run about two hundred of these images per set,
> ideally I would like to be able to have a macro command that I can add
> to a batch code I already wrote to clean out the heap after every image.
> Does anything like this exist as a command that can be added to a macro?
You can force a garbage collection with this macro call:
call("java.lang.System.gc");
However, my hunch is that the Foci 3D counter does not release memory
correctly. That would need a change in the code and is not as easy as
calling a macro.
Ciao,
Johannes
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html