Implement refcount GC.