Bug ID: 111567
           Summary: Template Manager memory leak in
           Product: LibreOffice
           Version: Master
          Hardware: x86-64 (AMD64)
                OS: Mac OS X (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: framework

When initiating the TemplateManager, and then moving through the dropdown
filter to filter templates according to application module, multiple instances
of memory leaks occur in 


Steps to Reproduce:
1. Start XCode, then
2. Choose Memory Leak profile tool
3. Select in instdir as target process
4. Click on the record button, LODev is started by the profiling tool
5. Wait for the StartCenter to load - note the occurrences of memory leaks as
they occur.
6. Open the template manager from the left dropdown menu.
7. When the Template Manager has loaded, cycle between the various application
module filters using the dropdown menu.
8. Close the template manager window.
9. Stop recording.
10. Analyse the profile trace.

Actual Results:  
Multiple instances of memory leaks occur in 


when instantiating and navigating through the template filter.

Expected Results:
It shouldn't leak memory

Reproducible: Always

User Profile Reset: No

Additional Info:
The problem appears to lie in templatelocalview.cxx in this block of code :

void TemplateLocalView::insertItems(const std::vector<TemplateItemProperties>
&rTemplates, bool isRegionSelected, bool bShowCategoryInTooltip)

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

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

        pChild->mnDocId = pCur->nDocId;
        pChild->mnRegionId = pCur->nRegionId;
        pChild->maTitle = pCur->aName;

and in particularly with this line :

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

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0)
Gecko/20100101 Firefox/54.0

You are receiving this mail because:
You are the assignee for the bug.
Libreoffice-bugs mailing list

Reply via email to