filmov
tv
Java Garbage Collection (manohar academy)

Показать описание
Welcome to manohar academy.
In this lesson we are going to learn about Java Garbage Collection process. Garbage Collection will be performed with the help of garbage collector, which is a system process running in the background.
On the heap memory, periodically, Garbage Collector checks for objects with out any reference. It destroys such objects and releases memory allocated to those objects.
Once we are done with an object we need to assign null to the reference variable in order to make the object eligible for garbage collection. But in most scenarios the reference variable might go out of scope and as a result the object will be no longer referenced by any variables.
The reference need not be present from stack memory alone. it an be there from other objects as well.
In this lesson we are going to learn about Java Garbage Collection process. Garbage Collection will be performed with the help of garbage collector, which is a system process running in the background.
On the heap memory, periodically, Garbage Collector checks for objects with out any reference. It destroys such objects and releases memory allocated to those objects.
Once we are done with an object we need to assign null to the reference variable in order to make the object eligible for garbage collection. But in most scenarios the reference variable might go out of scope and as a result the object will be no longer referenced by any variables.
The reference need not be present from stack memory alone. it an be there from other objects as well.