+ 7
Garbage collector
what is garbage collector in java
6 Réponses
+ 4
relations withe memory
+ 2
a very big topic totally skipped in the tutorial.
very briefly, there's Eden space where freshly created objects go. Those still around when collection comes get promoted to a survivor space that's cleaned less often. After surviving there they can enter another survivor space or join the old generation. Collection comes when space is needed and by focusing on just a subset of objects at a time stop the world events are reduced.
+ 2
In simple words
+ 2
when there are no more object references, the object is removed from the heap by the garbage collector
+ 1
After the execution process,the JVM inside stack area calls garbage collector which is a basic need provided by JVM.
When Garbage collector settles inside stack,the JVM pops out of stack
Finally the garbage collector cleans the abandoned objects and other trash that is present in the heap area.
+ 1
And the abandoned objects are eligible for garbage collector