NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 1163 - ImageJ doesn't release memory after closing an image
ImageJ doesn't release memory after closing an image
Status: RESOLVED INVALID
Product: ImageJ
Classification: Unclassified
Component: Common
unspecified
PC Windows
: P5 major
Assigned To: Curtis Rueden
Depends on:
Blocks:
 
Reported: 2015-09-24 04:08 CDT by Fred
Modified: 2015-09-24 09:48 CDT
2 users (show)

See Also:


Attachments
Taskmanager showing accumulating memory usage (128.13 KB, image/jpeg)
2015-09-24 04:08 CDT, Fred

Description Fred 2015-09-24 04:08:29 CDT
Created attachment 261
Taskmanager showing accumulating memory usage

When I analyse large images (1GB per image), then the memory is not released when I close the image and open a second. Only when closing the ImageJ application, the memory is released. Very annoying when analysing such images and have to restart Image J after each three images.

Regards, Fred Mellink
Comment 1 Jan Eglinger 2015-09-24 04:23:49 CDT
(In reply to Fred from comment #0)
> Created attachment 261
> Taskmanager showing accumulating memory usage
> 
> When I analyse large images (1GB per image), then the memory is not released
> when I close the image and open a second. Only when closing the ImageJ
> application, the memory is released. Very annoying when analysing such
> images and have to restart Image J after each three images.
> 
> Regards, Fred Mellink

Please have a look at the explanatory box here:
http://wiki.imagej.net/Troubleshooting#Common_error_messages

"This is a characteristic of the Java runtime. In many cases, Java never releases memory back to the system, so memory monitors such as Windows Task Manager will always report an ever-growing amount of RAM used by the Java process, until the JVM shuts down."

If you see accumulation of memory even within ImageJ using 'Plugins > Utilities > Monitor Memory...', please reopen this issue with more information how to reproduce.

Jan
Comment 2 Curtis Rueden 2015-09-24 09:48:22 CDT
Note that while it is expected to see an ever-increasing RAM usage in Task Manager, what is _not_ expected is to receive OutOfMemoryError in ImageJ while working with a single image at a time. Java should be reusing memory internally. So if you indeed _need_ to restart ImageJ every 3 images as you say due to OutOfMemoryError, that would constitute a real memory leak. And as Jan suggests: instructions to reproduce would be very helpful.