<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 8, 2013, at 2:41 PM, Chandler Carruth wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra">On Tue, Jan 8, 2013 at 1:04 PM, Nick Kledzik <span dir="ltr"><<a href="mailto:kledzik@apple.com" target="_blank" class="cremed">kledzik@apple.com</a>></span> wrote:<br><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":std">Author: kledzik<br>
Date: Tue Jan  8 15:04:44 2013<br>
New Revision: 171896<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=171896&view=rev" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project?rev=171896&view=rev</a><br>
Log:<br>
Fix memory leak in YAML I/O.<br></div></blockquote><div><br></div><div style="">Cool, thanks for looking at this.</div><div style=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":std">Stop using BumpPtrAllocator for HNodes because<br>
they have fields (vector, map) which require HNode<br>
destructors to be run.</div></blockquote><div><br></div><div style="">Note that you could instead have all the fields also go on the BumpPtrAllocator if this code is performance sensitive.</div></div></div></div></blockquote>The fields were std::vector<> and llvm::DenseMap<> which do their own internal allocations.  Somehow the destructor needs to run to get those allocations cleaned up.  BumpPtrAllocator (as far as I know) does not run destructors.</div><div><br></div><div>-Nick</div><div><br></div></body></html>