From: Benjamin Kramer Date: Sun, 15 Apr 2012 11:09:40 +0000 (+0000) Subject: Recursively delete rewrite rope nodes when tearing down the tree. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=398a4983cde8d31f0e2d9836010a943a9d6c0427;p=clang Recursively delete rewrite rope nodes when tearing down the tree. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154760 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Rewrite/RewriteRope.cpp b/lib/Rewrite/RewriteRope.cpp index 6c211b28fd..88bf21d171 100644 --- a/lib/Rewrite/RewriteRope.cpp +++ b/lib/Rewrite/RewriteRope.cpp @@ -407,6 +407,11 @@ namespace { Size = LHS->size() + RHS->size(); } + ~RopePieceBTreeInterior() { + Children[0]->Destroy(); + Children[1]->Destroy(); + } + bool isFull() const { return NumChildren == 2*WidthFactor; } unsigned getNumChildren() const { return NumChildren; }