MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / WeakUnref

Function WeakUnref

common/internal/reference_count.h:355–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355inline void WeakUnref(const ReferenceCount& refcount) noexcept {
356 const auto count =
357 refcount.weak_refcount_.fetch_sub(1, std::memory_order_acq_rel);
358 ABSL_DCHECK_GT(count, 0);
359 ABSL_ASSUME(count > 0);
360 if (ABSL_PREDICT_FALSE(count == 1)) {
361 const_cast<ReferenceCount&>(refcount).Delete();
362 }
363}
364
365inline void WeakUnref(const ReferenceCount* absl_nullable refcount) noexcept {
366 if (refcount != nullptr) {

Callers 2

TESTFunction · 0.85
StrongUnrefFunction · 0.85

Calls 1

DeleteMethod · 0.45

Tested by 1

TESTFunction · 0.68