The JVM controls the Garbage Collector; it decides when to run the Garbage Collector.
JVM runs the Garbage Collector when it realizes that the memory is running low, but this behavior of JVM can not be guaranteed.
One can request the Garbage Collection to happen from within the java program but there is no guarantee that this request will be taken care of by JVM.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.