What are the different generaions of Garbage Collection and
how do they work

Answer Posted / vijay

there r 3 generations. they r gen0,gen1,gen2.when objects r
created and buffer is full then garbage collector is called
and the unnecessary objects r removed based on the
priority.this is first generation ie.,gen0.now new objects
will be created.this generation is called gen1.when this is
also full then the unnecessary will be collected and cleaned.
and when new objects come then old objects will be placed in
gen0 and new objects will be kept in gen1.in this way
process continues and when gen2 also filled completely then
gen0 will be cleaned completely.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between function and method in c#?

535


What is xml c#?

569


What is difference between ienumerable and ienumerator in c#?

603


Why do you need boxing in c#?

576


Can abstract class be sealed?

561






How many types of methods are there in c#?

607


Are c# constructors the same as c++ constructors?

617


What is sealed class in c#?

595


What is an ienumerable in c#?

629


What do u mean by delegation of authority?

623


Why is dll used?

672


What is a .aspx file?

527


What is cts, clr?

513


Describe the ways of cleaning up objects in c#.

606


What is a factory in c#?

561