[Libreoffice-bugs] [Bug 111567] Template Manager memory leak in TemplateLocalView:: insertItems()

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Aug 10 09:16:42 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=111567

--- Comment #6 from Julien Nabet <serval2412 at yahoo.fr> ---
(In reply to Noel Grandin from comment #5)
> To me, looks like the bug is that 
> 
>    TemplateLocalView::insertItems()
> 
> calls 
> 
>    mItemList.clear();
> 
> at the top of it's code. It should not, it should leave the clearing and
> deleting to 
> 
>   ThumbnailView::updateItems
> 
> which already handles it correctly.
> 
> ...

You're right Noel.
ThumbnailView::updateItems (from
https://opengrok.libreoffice.org/xref/core/sfx2/source/control/thumbnailview.cxx#1005)
calls ThumbnailView::ImplDeleteItems() (from
https://opengrok.libreoffice.org/xref/core/sfx2/source/control/thumbnailview.cxx#ImplDeleteItems)
which deletes each item before clearing the vector.
So the simple patch would be to delete this extra "mItemList.clear();" in
TemplateLocalView::insertItems

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170810/2dd7e1fd/attachment.html>


More information about the Libreoffice-bugs mailing list