<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 9, 2016 at 6:54 PM, Marcello Maggioni via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">kariddi added inline comments.<br>
<br>
<br>
================<br>
Comment at: lib/Transforms/Scalar/NewGVN.<wbr>cpp:1219<br>
+  ExpressionAllocator.Reset();<br>
+  CongruenceClasses.clear();<br>
+  ExpressionToClass.clear();<br>
----------------<br>
This gets cleared, but the CongruenceClasses seem to be created through "new" and stored in the vector.<br></blockquote><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Where do they get destroyed?<br>
<br></blockquote><div>This code got lost somewhere on the branch, but yes, it should be properly deleting them, not just clear'ing.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<a href="https://reviews.llvm.org/D26224" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D26224</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div>