How to force garbage collection in java - Java @ Desk

Sunday, May 19, 2013

How to force garbage collection in java

1) Garbage collection cannot be forced, it can only be requested using code

System.gc().

2) JVM does not guarantee that GC will be started immediately.






No comments:

Post a Comment