<div dir="ltr">Where is the code? Looks like SimpleReference is used only by PE/COFF port.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 9, 2015 at 3:46 PM, Jean-Daniel Dupas <span dir="ltr"><<a href="mailto:mailing@xenonium.com" target="_blank">mailing@xenonium.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">SimpleReference was implemented using a vector not so long ago, but that design choice was made because std::vector is not bumpPtrAllocator friendly.<br>
Mach-O implementation (at least) uses a bumpPtrAllocator to allocate the SimpleReferences. So SimpleReference destructor is never call, and so are members destructor.<br>
If you use a std::vector, it means you will leak the vector storage memory. As all ilist nodes are allocated using the bumpPtr allocator, we don’t have that issue.<br>
<br>
<br>
<a href="http://reviews.llvm.org/D8182" target="_blank">http://reviews.llvm.org/D8182</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</blockquote></div><br></div>