MCPcopy Create free account
hub / github.com/apache/brpc / HasOneRef

Method HasOneRef

src/butil/memory/ref_counted.cc:12–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace subtle {
11
12bool RefCountedThreadSafeBase::HasOneRef() const {
13 return AtomicRefCountIsOne(
14 &const_cast<RefCountedThreadSafeBase*>(this)->ref_count_);
15}
16
17RefCountedThreadSafeBase::RefCountedThreadSafeBase() : ref_count_(0) {
18#ifndef NDEBUG

Callers 2

TESTFunction · 0.80
HasRefsFunction · 0.80

Calls 1

AtomicRefCountIsOneFunction · 0.85

Tested by 1

TESTFunction · 0.64