Implement a ref count GC.