Issue 120098 - [From Symphony] There is a memory leak in function WW8Export::WriteFkpPlcUsw
Summary: [From Symphony] There is a memory leak in function WW8Export::WriteFkpPlcUsw
Alias: None
Product: performance
Classification: Code
Component: code (show other issues)
Version: AOO 3.4.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Blocks: 120975 121366
  Show dependency tree
Reported: 2012-06-26 08:39 UTC by ChaoHuang
Modified: 2013-02-16 09:12 UTC (History)
2 users (show)

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

for file "main/sw/source/filter/ww8/wrtww8.cxx" and "main/sw/source/filter/ww8/wrtww8.hxx" (1.38 KB, patch)
2012-06-26 09:11 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-26 08:39:42 UTC
Steps to reproduce the defect:
1)Launch Aoo3.4
2) New a odt file, insert a picture
3) Save it as a MS word 2000 file
4) Close the doc file

Defect : There is a memory leak in function WW8Export::WriteFkpPlcUsw
Comment 1 ChaoHuang 2012-06-26 09:02:24 UTC
An unnamed object typed SotStorage will be created on heap when calling function SotStorage::OpenSotStorage. There is no place to release it. So it is a memory leak. The solution is to add a reference as a member data to record the unnamed object. The reference will be release in destructor in class WW8Export.
Comment 2 ChaoHuang 2012-06-26 09:11:56 UTC
Created attachment 78486 [details]
for file "main/sw/source/filter/ww8/wrtww8.cxx" and "main/sw/source/filter/ww8/wrtww8.hxx"
Comment 3 Armin Le Grand 2012-06-26 14:31:18 UTC
ALG: Added to codebase, built and checked. Destructor gets called as expected. Adding to trunk.
Added as r1354032, thanks for the patch!
Comment 4 ChaoHuang 2012-10-17 08:15:59 UTC
Suggest to put it into AOO 3.5.0 release
Comment 5 Yan Ji 2012-11-30 04:46:52 UTC
Since last SVT(r1400866) shows there is no memory leak, so close this defect as resolved.