How many types of generations are there in a garbage collector? Ans. Memory management in the CLR is divided into three generations that are build up by grouping memory segments. Generations enhance the garbage collection performance. The following are the three types of generations found in a garbage collector: Generation 0 - When an object is initialized, it is said to be in generation 0. Generation 1 - The objects that are under garbage collection process are considered to be in generation 1. Generation 2 - Whenever new objects are created and added to the memory, they are added to generation 0 and the old objects in generation 1 are considered to be in generation 2. - Study24x7
Social learning Network
02 May 2023 12:10 PM study24x7 study24x7

How many types of generations are there in a garbage collector? Ans. Memory management in the CLR is divided into three generations that are build up by grouping memory segments. Generations enhance the garbage collection performance. The following are the three types of generat...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles