1
Reply

Explain the role of Garbage collector and its generations?

Andrew

Andrew

13y
4k
0
Reply

    The garbage collector is a special function and feature which provided by Common Language Runtime(CLR) to improve the performance of Application. The garbage collector removes unwanted and unsed objects which created during the application development. The Grabage collector have Gen0,Gen1,Gen2 to for sort or divide the object by there category. when the objects are created firstly that stored in Gen0.after creation of objects unused objects are removed. the remaining objects are moved to gen1. again only those objects are stored g1 which are usefull other remaining object are removed. then again useful objects are moved to g2 and remaining which are not used among remaining objects that are removed. after all unwanted objects which are consumes memory that are removed by garbage collector and performance of application is improved.