Add a refcount function to RefPtr