#10:Types of Generators-GC

Garbage Collector has to decide Cleaning Process on Heap, based upon the lifetime of  objects. GC Categorizes the LifeTime with Generations,

Generation 0:Short Lived Objects.(Temp Variables)

Generation 1:Medium Lived Objects

Generation 2:Long Lived Objects.(static variables)

Generation 0 and 1 Are called Ephemeral(Short Lived) Segments.

Every Objects start their cycle with Generation 0,Upon Garbage Collection,if they survive the Clean,then these objects are moved to next generation.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s