You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by be...@apache.org on 2015/02/24 15:10:47 UTC

[2/3] cassandra git commit: ninja log deallocate in Ref.ensureReleased()

ninja log deallocate in Ref.ensureReleased()


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/766d8c01
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/766d8c01
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/766d8c01

Branch: refs/heads/trunk
Commit: 766d8c01033bfe0f1f9713e129fe07d157874fec
Parents: 0a7f508
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Tue Feb 24 14:10:25 2015 +0000
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Tue Feb 24 14:10:25 2015 +0000

----------------------------------------------------------------------
 src/java/org/apache/cassandra/utils/concurrent/Ref.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/766d8c01/src/java/org/apache/cassandra/utils/concurrent/Ref.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/concurrent/Ref.java b/src/java/org/apache/cassandra/utils/concurrent/Ref.java
index dd04051..8213c46 100644
--- a/src/java/org/apache/cassandra/utils/concurrent/Ref.java
+++ b/src/java/org/apache/cassandra/utils/concurrent/Ref.java
@@ -153,7 +153,11 @@ public final class Ref<T> implements RefCounted<T>, AutoCloseable
         void ensureReleased()
         {
             if (releasedUpdater.getAndSet(this, 1) == 0)
+            {
                 globalState.release(this);
+                if (DEBUG_ENABLED)
+                    debug.deallocate();
+            }
         }
 
         void release(boolean leak)