MCPcopy Create free account
hub / github.com/apache/impala / Release

Method Release

be/src/gutil/ref_counted.cc:38–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38bool RefCountedBase::Release() const {
39 // TODO(maruel): Add back once it doesn't assert 500 times/sec.
40 // Current thread books the critical section "AddRelease" without release it.
41 // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_);
42#ifndef NDEBUG
43 DCHECK(!in_dtor_);
44#endif
45 if (--ref_count_ == 0) {
46#ifndef NDEBUG
47 in_dtor_ = true;
48#endif
49 return true;
50 }
51 return false;
52}
53
54bool RefCountedThreadSafeBase::HasOneRef() const {
55 return base::RefCountIsOne(

Callers

nothing calls this directly

Calls 2

RefCountIsZeroFunction · 0.85
RefCountDecFunction · 0.85

Tested by

no test coverage detected