How Does Garbage Collection Work in Java ?

Java has an automated process called Garbage Collector for Memory Management. It is a daemon in JVM that monitors the memory usage and performs memory cleanup. Once JVM is low on memory, GC process finds the unused objects that are not referenced by other objects. These unused objects are cleaned up by Garbage Collector daemon in JVM.



You May Interest

What are the Differences Between Internal and External Iterator i ...

Why Should You Define a Default Constructor in Java ?

What are the Thread-safe Classes in Java Collections Framework ?

What are the Similarities Between HashSet and HashMap in Java ?

What are the Situations in Which You Choose HashSet or TreeSet in ...