summaryrefslogtreecommitdiff
path: root/grpc/src/core/lib/gprpp/dual_ref_counted.h
diff options
context:
space:
mode:
Diffstat (limited to 'grpc/src/core/lib/gprpp/dual_ref_counted.h')
-rw-r--r--grpc/src/core/lib/gprpp/dual_ref_counted.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/grpc/src/core/lib/gprpp/dual_ref_counted.h b/grpc/src/core/lib/gprpp/dual_ref_counted.h
index 91469eaf..5217bfa1 100644
--- a/grpc/src/core/lib/gprpp/dual_ref_counted.h
+++ b/grpc/src/core/lib/gprpp/dual_ref_counted.h
@@ -170,8 +170,8 @@ class DualRefCounted : public Orphanable {
#endif
const uint64_t prev_ref_pair =
refs_.FetchSub(MakeRefPair(0, 1), MemoryOrder::ACQ_REL);
- const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
#ifndef NDEBUG
+ const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
if (trace != nullptr) {
gpr_log(GPR_INFO, "%s:%p weak_unref %d -> %d (refs=%d)", trace, this,
@@ -192,10 +192,10 @@ class DualRefCounted : public Orphanable {
#endif
const uint64_t prev_ref_pair =
refs_.FetchSub(MakeRefPair(0, 1), MemoryOrder::ACQ_REL);
- const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
#ifndef NDEBUG
+ const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
- if (trace_ != nullptr) {
+ if (trace != nullptr) {
gpr_log(GPR_INFO, "%s:%p %s:%d weak_unref %d -> %d (refs=%d) %s", trace,
this, location.file(), location.line(), weak_refs, weak_refs - 1,
strong_refs, reason);