Re: Out of Memory Problems
Posted by
Gabriel Landini on
Jul 26, 2013; 11:59am
URL: http://imagej.273.s1.nabble.com/Out-of-Memory-Problems-tp5004033p5004151.html
On Friday 26 Jul 2013 05:22:31 Rasband, Wayne [E] wrote:
> With ImageJ 1.48a and earlier, the memory is not reclaimed when you
> click in the "Memory" window.
Is this code supposed to work if pasted all in a macro window (it does not
here) or does it have to be split into 2 macros?
> doCommand("Monitor Memory...");
> setBatchMode(true);
> for(i=0;i<100;i++) {
> run("Open Image");
> wait(20);
> }
> run("Close All");
> exit;
>
> macro "Open Image" {
> newImage("Untitled", "8-bit ramp", 1024, 1024, 1);
> }
>
If I replace run("Open Image"); with the line newImage(... etc
(i.e. avoid having 2 macros) the memory consumption increases and it is never
released by the garbage collector. IJ1.48b1 Java 1.6.0_35 (64bit linux).
Sorry if I misunderstood
Cheers
Gabriel
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html