Answer
The Garbage Collector (GC) frees unused heap objects automatically.
It uses generations (Gen0, Gen1, Gen2) to optimize collection of short-lived and long-lived objects.
The GC pauses execution, removes unreachable objects, and compacts memory.