]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/common/RefCountedObj.h
import quincy beta 17.1.0
[ceph.git] / ceph / src / common / RefCountedObj.h
index b23f488cad90ba815286470e058b766e458b8f5c..2de1cf14ef3be19c8f81831488330600a59d0986 100644 (file)
@@ -193,6 +193,14 @@ static inline void intrusive_ptr_add_ref(const RefCountedObject *p) {
 static inline void intrusive_ptr_release(const RefCountedObject *p) {
   p->put();
 }
+struct UniquePtrDeleter
+{
+  void operator()(RefCountedObject *p) const
+  {
+    // Don't expect a call to `get()` in the ctor as we manually set nref to 1
+    p->put();
+  }
+};
 }
 using RefCountedPtr = ceph::ref_t<TOPNSPC::common::RefCountedObject>;