Morgan Stanley Interview Question

How would you implement a Garbage Collector?