Issue 119991 - [From Symphony] There is a memory leak in function SvxUnoDrawPool::~SvxUnoDrawPool()
Summary: [From Symphony] There is a memory leak in function SvxUnoDrawPool::~SvxUnoDra...
Status: CLOSED FIXED
Alias: None
Product: performance
Classification: Code
Component: www (show other issues)
Version: AOO 3.4.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: zhang jianfang
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 120975 121366
  Show dependency tree
 
Reported: 2012-06-14 16:07 UTC by ChaoHuang
Modified: 2013-02-16 09:22 UTC (History)
4 users (show)

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


Attachments
for file "main\svx\source\unodraw\unopool.cxx" (587 bytes, patch)
2012-06-14 17:07 UTC, ChaoHuang
chao.dev.h: review?
Details | Diff

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