Issue 120074

Summary: [From Symphony] There is a memory leak in function SdDrawDocument::RenameLayoutTemplate
Product: performance Reporter: ChaoHuang <chao.dev.h>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: Armin.Le.Grand, liushenf
Version: AOO 3.4.0   
Target Milestone: 4.0.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 120975, 121366    
Attachments:
Description Flags
for file "main/sd/source/core/drawdoc4.cxx" chao.dev.h: review?

Description ChaoHuang 2012-06-25 03:28:27 UTC
Steps to reproduce the defect:
1) Launch Aoo3.4
2) New a odp file from template
3) Close the odp file

Defect : There is a memory leak in function SdDrawDocument::RenameLayoutTemplate
Comment 1 ChaoHuang 2012-06-25 03:33:58 UTC
A set of StyleReplaceData object will be created and put into the list in the first loop on heap. But there are not released in the function. So it is a memory leak. Need to free these objects in list explicitly.
Comment 2 ChaoHuang 2012-06-25 03:34:31 UTC
Created attachment 78453 [details]
for file "main/sd/source/core/drawdoc4.cxx"
Comment 3 Armin Le Grand 2012-06-25 13:16:57 UTC
ALG: Taking a look. This is a good opportunity to get away fromthe old List class implementation and over to stl usage.
Comment 4 Armin Le Grand 2012-06-25 13:49:06 UTC
ALG: Exchanged List with stl::vector, adapted implementation. Checked, works well. Preparing commit...
Comment 5 Armin Le Grand 2012-06-25 13:51:53 UTC
ALG: COmitted with r1353552, thanks for the patch, good find!
Comment 6 ChaoHuang 2012-10-17 08:14:40 UTC
Suggest to put it into AOO 3.5.0 release
Comment 7 Yan Ji 2012-11-30 04:47:10 UTC
Since last SVT(r1400866) shows there is no memory leak, so close this defect as resolved.