+ 7

Garbage collector

what is garbage collector in java

7th Jan 2017, 9:39 PM
ramzieus ⚡
ramzieus ⚡ - avatar
6 Answers
+ 4
relations withe memory
8th Jan 2017, 8:36 AM
ramzieus ⚡
ramzieus ⚡ - avatar
+ 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.
8th Jan 2017, 12:30 AM
Leon
Leon - avatar
+ 2
In simple words
5th Dec 2019, 10:23 AM
UraL
+ 2
when there are no more object references, the object is removed from the heap by the garbage collector
5th Dec 2019, 10:23 AM
UraL
+ 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.
17th Jul 2020, 3:33 AM
Nishanth
Nishanth - avatar
+ 1
And the abandoned objects are eligible for garbage collector
17th Jul 2020, 3:33 AM
Nishanth
Nishanth - avatar