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 parameters in c#?

497


What is difference between encapsulation and abstraction in c#?

454


what is the equivalent to regsvr32 and regsvr32 /u a file in .net development?

550


What is a delegate how is it type safe?

465


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

494






Why do we need to call CG.SupressFinalize?

552


Can we have 2 main methods in c#?

482


What is difference between hashtable and dictionary in c#?

491


What is the difference between abstract class and interface in c#?

491


Why do we need to serialize data?

499


Is c# or c++ better for games?

464


Explain the process of polymorphism with an example?

472


What is a static in c#?

492


What is the difference between System.console.WriteLine() and System.console.Write() function?example?

580


What is the difference between ref & out parameters in c#?

456