Core Java tutorials.
Java Runtime provides various Garbage collection types in Java. One may choose them according to the requirements of performance of your application. In Java 5, three garbage collectors are added except “serial” garbage collector. Each garbage collector is implemented to raise the throughput of application or to reduce the garbage collection’s pause time. 1) Throughput Garbage Collector:
Garbage collector used parallel version of the Young generation collector. JVM, -XX:+UseParallelGC
A new object is stored into heap when it is created by the Java Program. Heap is also call garbage collectable heap and it can be released by the garbage collector. Garbage collector is a JVM low priority thread and its execution cannot be forced. It is executed to release memory allocated to unused object. Also you can ask garbage collector to release memory by using System.gc()
Object is unreachable when it has no other object that is referencing to this object. In such cases this