How does garbage collection work?
Utilisateur anonyme
Very briefly: The .NET Garbage Collection (GC) sorts the objects by generations (3 total). The lower the generation the more frequently it is checked. During each pass, if an object is referred to by any other object/method GC promotes it to higher generation. Otherwise, it is either destroyed, or marked as needing finalization (will be finalized and destroyed during next pass).