Mike:

How does the garbage collector know when something has gone out of scope

The garbage collector doesn't know that.
Look in Wikipedia how a Mark&Sweep GC works.

Bye,
bearophile

Reply via email to