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

Benjamin Kramer benny.kra at googlemail.com
Sun Apr 15 04:09:41 PDT 2012


Author: d0k
Date: Sun Apr 15 06:09:40 2012
New Revision: 154760

URL: http://llvm.org/viewvc/llvm-project?rev=154760&view=rev
Log:
Recursively delete rewrite rope nodes when tearing down the tree.

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=154760&r1=154759&r2=154760&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/RewriteRope.cpp (original)
+++ cfe/trunk/lib/Rewrite/RewriteRope.cpp Sun Apr 15 06:09:40 2012
@@ -407,6 +407,11 @@
       Size = LHS->size() + RHS->size();
     }
 
+    ~RopePieceBTreeInterior() {
+      Children[0]->Destroy();
+      Children[1]->Destroy();
+    }
+
     bool isFull() const { return NumChildren == 2*WidthFactor; }
 
     unsigned getNumChildren() const { return NumChildren; }





More information about the cfe-commits mailing list