How does garbage collection decide what can be reclaimed?
Strong answer
The collector traces reachability from GC roots. An object can be reclaimed when no path from any root reaches it, regardless of whether the program still has a variable that once referred to it.
