Hi Gabriel,
are you sure it is a memory leak? Java is very reluctant to give back any memory it has ever allocated from the operating system, even if it has a lot of free memory after Garbage Collection.
So if you click on the status line to run gc every time after running the macro, so that Java never claims additional memory from the operating system, do you still see the memory of the JVM increase?
Alternatively, if you run Plugins>Utilties>Monitor Memory, does the memory indicated by the System Activity monitor increase even though 'Monitor meory' of ImageJ shows no increase over the maximum amount used previously?
Michael
________________________________________________________________
On Jan 8, 2012, at 23:48, Gabriel Landini wrote:
> On Sunday 08 Jan 2012 22:22:07 you wrote:
>> When using ImageJ with openjdk 1.6.0_22 (linux 64bit) I see a memory leak
>> (~2 MB each time I run the following script).
>
> Actually it is the System Activity program that shows memory usage going up,
> but IJ's memory does not (when clicking on the status bar...) Am I
> misinterpreting what the System Activity reports? The memory usage keeps going
> up... and never goes down.
>
> I checked and this happens with Oracle's Java too... (1.6.0_30).
> Thanks for any further clues.
>
> Gabriel