[Libreoffice-bugs] [Bug 111567] New: Template Manager memory leak in TemplateLocalView:: insertItems()
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed Aug 9 16:17:18 UTC 2017
https://bugs.documentfoundation.org/show_bug.cgi?id=111567
Bug ID: 111567
Summary: Template Manager memory leak in
TemplateLocalView::insertItems()
Product: LibreOffice
Version: 6.0.0.0.alpha0+ Master
Hardware: x86-64 (AMD64)
OS: Mac OS X (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: framework
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: iplaw67 at tuta.io
Description:
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
TemplateLocalView::insertItems()
Steps to Reproduce:
1. Start XCode, then Instruments.app
2. Choose Memory Leak profile tool
3. Select LibreOffice.app 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
TemplateLocalView::insertItems()
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)
{
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);
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170809/91d3a537/attachment.html>
More information about the Libreoffice-bugs
mailing list