Issue 119991

Summary: [From Symphony] There is a memory leak in function SvxUnoDrawPool::~SvxUnoDrawPool()
Product: performance Reporter: ChaoHuang <chao.dev.h>
Component: wwwAssignee: zhang jianfang <zhangjf>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: Armin.Le.Grand, issues, liushenf, zhangjf
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\svx\source\unodraw\unopool.cxx" chao.dev.h: review?

Description ChaoHuang 2012-06-14 16:07:37 UTC
Steps to reproduce the issue
1) Launch Aoo3.4
2) New a odp file
3) Input in textbox
4) Save the odp file

Defect : There is a memory leak in function SvxUnoDrawPool::~SvxUnoDrawPool()
Comment 1 ChaoHuang 2012-06-14 16:36:07 UTC
The secondary pool created in function SvxUnoDrawPool::init() will not be released in function SvxUnoDrawPool::~SvxUnoDrawPool(). Need to free it explictly.
Comment 2 ChaoHuang 2012-06-14 17:07:46 UTC
Created attachment 78330 [details]
for file "main\svx\source\unodraw\unopool.cxx"
Comment 3 zhang jianfang 2012-06-18 13:59:23 UTC
take over the bug to commit it's code.
Comment 4 zhang jianfang 2012-06-18 14:04:19 UTC
Committed to AOO trunk by revision 1351347.
Comment 5 Armin Le Grand 2012-06-22 10:12:34 UTC
ALG: Unfortunately this leads to problems. When deleting the secondary pool first, it still has it's master set (pMaster) and asserts this. The correct way is to first delete the master pool (mpDefaultsPool) which rsets the pMaster at the pSecondaryPool, and then pSecondaryPool. See e.g. how SdrModel::~SdrModel destructs it's pool.
Comitted as r1352830.
Comment 6 ChaoHuang 2012-06-22 11:46:56 UTC
(In reply to comment #5)
> ALG: Unfortunately this leads to problems. When deleting the secondary pool
> first, it still has it's master set (pMaster) and asserts this. The correct
> way is to first delete the master pool (mpDefaultsPool) which rsets the
> pMaster at the pSecondaryPool, and then pSecondaryPool. See e.g. how
> SdrModel::~SdrModel destructs it's pool.
> Comitted as r1352830.

hi, Armin
Thanks for your correction on the sequence. I learnt a lot in this mistake. You are a nice man.
Comment 7 ChaoHuang 2012-10-17 08:09:26 UTC
Suggest to put it into AOO 3.5.0 release
Comment 8 Yan Ji 2012-11-30 04:47:01 UTC
Since last SVT(r1400866) shows there is no memory leak, so close this defect as resolved.