How does garbage collection work?

Finlay McWalter

The best book reference for Garbage Collection is: Garbage Collection - Algorithms for Automatic Dynamic Memory Management by Jones and Lins.

It's available via Amazon and FatBrain.

After reading this you'll cry and cry and never want to write a GC yourself ever ever again.