Amazon interview question

How would you implement a garbage collector? How would this deal with multi-thread applications?