I use Fiji/ImageJ on Windows and encountered the following problem: when I close a file, the memory allocated for that file is not released. ImageJ keeps that memory allocated, and reuses it when other files are opened.
So this is not strictly a memory leak, but still highly annoying, especially when working with large files. Is there a manual or (preferably) automatic way to trigger garbage collection after images are closed?
Edit:
Example: I use a large file and windows task manager to check memory allocation.
- clean start: 9278K of 12123MB in ImageJ, 3.56GB/16GB used in task manager.
- open large raw file: 5928MB of 12123MB, 9.41/16GB in task manager
- close large file: 9253K of 12123MB, 9.43/16GB GB in task manager. Fiji-win64.exe still uses 6419188K memory in task manager.
- Close Fiji: 3.28 GB / 16GB in task manager.
My problem is that I normally always keep Fiji open with a few files and windows. Then I open some large files and eventually close them, but ImageJ still keeps my memory reserved. Then I start executing a memory hungry job, and I quickly run out of memory and the whole system hungs up when windows starts swapping things.