I was looking at a post and it seemed to suggest even if you run System.gc that garbage collection may not be done before the job terminates. Is this true? How do you handle the remaining objects after the job termination? Thanks Dan
posted 16 years ago
Yes, it's true. "If your program completes and the garbage collector never gets around to releasing the storage for any of your objects, that storage will be returned to the operating system en masse as the program exits." as stated from Thinking in Java.