Issue 120098

Summary: [From Symphony] There is a memory leak in function WW8Export::WriteFkpPlcUsw
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/sw/source/filter/ww8/wrtww8.cxx" and "main/sw/source/filter/ww8/wrtww8.hxx" chao.dev.h: review?

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.