This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
When an object is elligible for garbage collection, it MIGHT be collected at some point, but you never know if or when. It's possible that the program could run for years, and if memory never becomes an issue, that object will not be GC'd.
The best you can do is make the call to suggest the JVM do a GC, but it's only a suggestion. The JVM is free to ignore, and often does, the suggestion.
Why do they ask how many objects are elligible? to see if you understand garbage collection. Why else? [ May 25, 2005: Message edited by: fred rosenberger ]
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors