Last Updated: May 22, 2026
C# is a managed language: you allocate objects with new and the runtime decides when to free them. The piece of the .NET runtime that does the freeing is the garbage collector, or GC. This lesson covers how the GC decides what's still in use, the generational design that makes it fast, the two big collection modes (workstation versus server), the latency knobs available, and the small set of GC API calls that show up in real code.