[cfe-commits] r84615 - /cfe/trunk/lib/Rewrite/RewriteRope.cpp

Ted Kremenek kremenek at apple.com
Mon Oct 19 23:31:34 PDT 2009


Author: kremenek
Date: Tue Oct 20 01:31:34 2009
New Revision: 84615

URL: http://llvm.org/viewvc/llvm-project?rev=84615&view=rev
Log:
Call 'clear()' in ~RopePieceBTreeLeaf(), decrementing the reference
counts of the bufffers referened by the RopePieces in
RopePieceBTreeLeaf.  This (I believe) corrently fixes the leak I meant
to fix in r84601 (which ended up causing an overrelease).

Modified:
    cfe/trunk/lib/Rewrite/RewriteRope.cpp

Modified: cfe/trunk/lib/Rewrite/RewriteRope.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/RewriteRope.cpp?rev=84615&r1=84614&r2=84615&view=diff

==============================================================================
--- cfe/trunk/lib/Rewrite/RewriteRope.cpp (original)
+++ cfe/trunk/lib/Rewrite/RewriteRope.cpp Tue Oct 20 01:31:34 2009
@@ -154,6 +154,7 @@
     ~RopePieceBTreeLeaf() {
       if (PrevLeaf || NextLeaf)
         removeFromLeafInOrder();
+      clear();
     }
 
     bool isFull() const { return NumPieces == 2*WidthFactor; }





More information about the cfe-commits mailing list