]> granicus.if.org Git - clang/commitdiff
Call 'clear()' in ~RopePieceBTreeLeaf(), decrementing the reference
authorTed Kremenek <kremenek@apple.com>
Tue, 20 Oct 2009 06:31:34 +0000 (06:31 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 20 Oct 2009 06:31:34 +0000 (06:31 +0000)
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84615 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Rewrite/RewriteRope.cpp

index 30bbcfafb5321e8cedeb48a44e0c7e69cd0c03f8..fdb6fc385ba1c9178c7db609c39734adbfbd66f2 100644 (file)
@@ -154,6 +154,7 @@ namespace {
     ~RopePieceBTreeLeaf() {
       if (PrevLeaf || NextLeaf)
         removeFromLeafInOrder();
+      clear();
     }
 
     bool isFull() const { return NumPieces == 2*WidthFactor; }