This is the problem. I’m working on a little Java tool which is composed of 2 steps (read & write then analysis of the previously created file).
As the two steps are quite heavy in terms of quantity of heap space, I would like to release all the resources and empty the memory before going ahead (as in System.exit(0)).
Is it possible? How can I do that?
Java’s GC should take care of your memory. If an object is not referenced, you should be fine. If you have open Files or streams, close them explicitly. Otherwise, you should be good. Is there anything specific that you looking for that is causing an issue and need help with?