Issue 120074 - [From Symphony] There is a memory leak in function SdDrawDocument::RenameLayoutTemplate
[From Symphony] There is a memory leak in function SdDrawDocument::RenameLayo...
Product: performance
Classification: Code
Component: code
AOO 3.4.0
All All
: P3 Normal (vote)
: AOO 4.0
Assigned To: AOO issues mailing list
Depends on:
Blocks: 120975 121366
  Show dependency treegraph
Reported: 2012-06-25 03:28 UTC by ChaoHuang
Modified: 2013-02-16 09:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

for file "main/sd/source/core/drawdoc4.cxx" (592 bytes, patch)
2012-06-25 03:34 UTC, ChaoHuang review?
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
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.