Wednesday, May 14, 2008

How can you force Garbage Collection?


You can’t force it to run. You can only request. This request can be made by calling ‘System.gc()’ API. GC is never guaranteed by the JVM to be started immediately after placing the request. Based on the particular implementation of the JVM, it may prioritize the next cycle of GC. That’s it.



Share/Save/Bookmark


No comments: