Making Object refcounting atomic