<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Memory Leak in sd::TemplateScanner::ScanEntry()"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=111892#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Memory Leak in sd::TemplateScanner::ScanEntry()"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=111892">bug 111892</a>
              from <span class="vcard"><a class="email" href="mailto:noelgrandin@gmail.com" title="Noel Grandin <noelgrandin@gmail.com>"> <span class="fn">Noel Grandin</span></a>
</span></b>
        <pre>(In reply to Julien Nabet from <a href="show_bug.cgi?id=111892#c9">comment #9</a>)
<span class="quote">> But here, since we've got a vector of pointers of TemplateEntry objects (see
> <a href="https://opengrok.libreoffice.org/xref/core/sd/source/ui/inc/TemplateScanner">https://opengrok.libreoffice.org/xref/core/sd/source/ui/inc/TemplateScanner</a>.
> hxx#115), shouldn't we add a loop to call delete on each entry of the vector
> during destruction?
> (<a href="https://opengrok.libreoffice.org/xref/core/sd/source/ui/dlg/TemplateScanner">https://opengrok.libreoffice.org/xref/core/sd/source/ui/dlg/TemplateScanner</a>.
> cxx#128)</span >

Yes, it looks like the TemplateEntry objects are being leaked. 

As near as I can tell, maFolderList is not doing anything useful currently, and
can be removed.

After that, mpTemplateEntries can be converted to
std::vector<std::unique_ptr<T>></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>