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

--- Comment #4 from Alex Thurgood <ipla...@tuta.io> ---
Well profiling with Instruments.app under Mac OSX and my master build shows
that LO leaks memory fairly importantly in this function block of code in 


templatelocalview.cxx :

void TemplateLocalView::insertItems(const std::vector<TemplateItemProperties>
&rTemplates, bool isRegionSelected, bool bShowCategoryInTooltip)
{
    mItemList.clear();

    std::vector<ThumbnailViewItem*> aItems(rTemplates.size());
    for (size_t i = 0, n = rTemplates.size(); i < n; ++i )
    {
        const TemplateItemProperties *pCur = &rTemplates[i];

        TemplateViewItem *pChild;
        if(isRegionSelected)
            pChild = new TemplateViewItem(*this, pCur->nId);
        else
            pChild = new TemplateViewItem(*this, i+1);

        pChild->mnDocId = pCur->nDocId;
        pChild->mnRegionId = pCur->nRegionId;
        pChild->maTitle = pCur->aName;
        pChild->setPath(pCur->aPath);

        if(!bShowCategoryInTooltip)
            pChild->setHelpText(pCur->aName);
        else
        {

Each invocation of 

else
            pChild = new TemplateViewItem(*this, i+1);


causes 400 bytes of memory to leak. Multiply that by the number of templates
you have and memory consumption quickly skyrockets.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to