<div dir="ltr"><div class="gmail_default" style>On Tue, Jan 8, 2013 at 2:44 PM, Nick Kledzik <span dir="ltr"><<a href="mailto:kledzik@apple.com" target="_blank" class="cremed">kledzik@apple.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div><div class="h5">
<div>On Jan 8, 2013, at 2:41 PM, Chandler Carruth wrote:</div><br><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>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>Cool, thanks for looking at this.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>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>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></div>
</div>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></blockquote><div><br></div><div style>Yea, if you'd have to directly go in and do all the allocation w/ the allocator, and we don't have a good way of doing that today. Bleh.</div></div></div></div>