| 1. |
How does Garbage Collection work? |
|
Answer» Certain Garbage Collection ought to be dealt with by the .Net structure. At the point when the object is created then it will be put in the Generation 0. The Garbage Collection utilizes an algorithm which checks the object’s in the age by identifying its current generation number. Once the object’s lifetime is over then it will be expelled from the memory. The two sorts of items. One is Live Objects and Dead Objects. The Garbage Collection algorithm gathers every single unused object that are dead objects in the age. In the event that the live objects RUNNING for long time, at that point DEPENDENT on that lifetime it will be moved to the next generation. The object cleaning in the age won't HAPPEN precisely after the existence time over of the specific object. At some particular time Garbage Collection starts ACTING on it & implement its sweeping algorithm to free up the spaces. |
|