Could somebody please explain me what is generations in garbage collection?
i am reading it on internet but feeling difficult to understand it…
Could somebody please explain me what is generations in garbage collection? i am reading
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A generation is a group of objects. A generational garbage collector groups objects based upon how many runs of the collector they have survived.
Initially, all object will be in the first generation (a group of objects). Then after the garbage collector runs some of the objects will be collected since no one is referencing them anymore but the rest will be placed is the second generation group.
The objects are grouped into generations to exploit the idea that more recently created objects become unused most often. A generational garbage collector will collect the first generation more often than the second generation, and second more than the third…