My users are using the Pet Ct viewer and the same problem of memory not being freed exists there.
To demonstrate the problem I measured the memory use at start (total memory) at 2.6GB.
Then I did a drag and drop of the folders one by one. Each time I told it to make a stack.
I was careful not to open Pet Ct viewer, so as not to complicate the problem.
Memory use went up to 3.3GB.
Then I hit "X" on each of the studies and the memory use remained at 3.3GB.
The problem the users are seeing is that over time there is a Java error saying it is out of memory, so Fiji crashes.
If you say that bio-formats release memory, perhaps I need to port over my application to bio-formats? I use imagePlus objects all over the place and I don't know what to port them to. There are other ImageJ programs like Gaussian smooth that I use, and it isn't clear if would be able to continue to use them.