Implement a refcount GC.