memory: only check the locking refcount