Login  Register

Re: memory usage buildup

Posted by JaapK on Jan 05, 2011; 3:12pm
URL: http://imagej.273.s1.nabble.com/memory-usage-buildup-tp3686005p3686009.html

I have run the garbage collector at the start of every iteration and I
set all imageprocessors, imageplus's, particleanalyzers etc to "None"
manually (the jython equivalent of 'null'). Also, I used the visualVM
tool to check a bit what was going on.
I managed to decrease the buildup of memory, but I haven't been able
to stabilize it completely. It might be a 'non-proper' programming
thing after all. The script is becoming a bit cluttered anyway. I am
going to convert from jython to pure java and tidy it up in the
process. Hopefully that will solve it.

Thanks for your support!

Regards,
Jaap Kokorian

2011/1/3 Michael Doube <[hidden email]>:

>> when you click on the status bar, ImageJ does
>> garbage collection which works great.  In long macros with batch
>> processing I have the macro call the garbage collection plugin which
>> you can get on the ImageJ website.  You need to call it a few times.
>
> For sure, if that works then ignore my suggestion, which is much more
> complicated. If you find that your plugin is resistant to manual garbage
> collection, you'll need to probe deeper.
>
> Michael
>