+ 2
How to force the GC in Java?
3 ответов
+ 6
You can't force it. It automatically operates behind the scenes.
+ 6
Thanks Jay Matthews. I didn't know about System.gc();
+ 5
Sonic's original answer isn't entirely wrong. System.gc() doesn't *force* garbage collection to occur - It prompts the JVM to do GC but does not guarantee it.