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

Why is lazy loading?

492


How to achieve polymorphism in c#?

537


Explain the difference between the system.array.copyto() and system.array.clone()?

492


Does c# support try-catch-finally blocks?

474


What is null character in string?

513






Which program construct must return a value?

565


What is throw in c#?

510


What are the 3 different types of arrays?

559


Does c# support templates?

531


Is lazy t thread safe?

544


What Is A Multicast Delegate?

541


Why we use get set property in c#?

470


Does c# support a variable number of arguments?

604


What is querystring in c#?

483


What is a struct in C#?

555