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.
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.
Posted in: