Home | History | Annotate | Download | only in ADT

Lines Matching refs:RefCount

15 // refcount member variable and methods for updating the refcount.  An object
17 // refcount hits zero.
24 // // Constructing an IntrusiveRefCntPtr increases the pointee's refcount by
28 // // Copying an IntrusiveRefCntPtr increases the pointee's refcount by 1.
32 // // refcount. After a move, the moved-from pointer is null.
36 // // Clearing an IntrusiveRefCntPtr decreases the pointee's refcount by 1.
40 // // Ptr3's destructor decrements its refcount to 0.
69 /// refcount, respectively. When a Release() call decrements the refcount to 0,
72 mutable unsigned RefCount = 0;
76 RefCountedBase(const RefCountedBase &) : RefCount(0) {}
78 void Retain() const { ++RefCount; }
80 assert(RefCount > 0 && "Reference count is already zero.");
81 if (--RefCount == 0)
88 mutable std::atomic<int> RefCount;
91 ThreadSafeRefCountedBase() : RefCount(0) {}
94 void Retain() const { RefCount.fetch_add(1, std::memory_order_relaxed); }
97 int NewRefCount = RefCount.fetch_sub(1, std::memory_order_acq_rel) - 1;
133 /// decrements its refcount when it's destroyed (or is changed to point to a