diff options
Diffstat (limited to 'tensorflow/core/lib/core/refcount.h')
-rw-r--r-- | tensorflow/core/lib/core/refcount.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/core/lib/core/refcount.h b/tensorflow/core/lib/core/refcount.h index 21919adc2c..eb41f9ff36 100644 --- a/tensorflow/core/lib/core/refcount.h +++ b/tensorflow/core/lib/core/refcount.h @@ -87,7 +87,7 @@ inline bool RefCounted::Unref() const { DCHECK_GT(ref_.load(), 0); // If ref_==1, this object is owned only by the caller. Bypass a locked op // in that case. - if (ref_.load(std::memory_order_acquire) == 1 || ref_.fetch_sub(1) == 1) { + if (RefCountIsOne() || ref_.fetch_sub(1) == 1) { // Make DCHECK in ~RefCounted happy DCHECK((ref_.store(0), true)); delete this; |