Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | All ChartModel/ChartView objects are not released | ||||||
---|---|---|---|---|---|---|---|
Product: | General | Reporter: | zhang jianfang <zhangjf> | ||||
Component: | chart | Assignee: | zhang jianfang <zhangjf> | ||||
Status: | CLOSED FIXED | QA Contact: | |||||
Severity: | Normal | ||||||
Priority: | P3 | ||||||
Version: | 3.3.0 or older (OOo) | ||||||
Target Milestone: | 4.0.0 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||
Developer Difficulty: | --- | ||||||
Issue Depends on: | |||||||
Issue Blocks: | 120975, 120831 | ||||||
Attachments: |
|
Description
zhang jianfang
2012-09-06 05:49:37 UTC
The root cause is in ChartModel ctor, it calls, m_xOldModelAgg.set( m_xContext->getServiceManager()->createInstanceWithContext( CHART_CHARTAPIWRAPPER_SERVICE_NAME, m_xContext ), uno::UNO_QUERY_THROW ); m_xOldModelAgg->setDelegator( *this ); Then xOldModelAgg has a cycle reference back to ChartModel object itself. While in hg changeset 274456, it removes below code from ChartModel::Dispose() if( m_xOldModelAgg.is()) { m_xOldModelAgg->setDelegator( 0 ); m_xOldModelAgg.clear(); } So it never has a chance to reset the cyclic reference. Created attachment 79311 [details]
fix code patch
So the simple fix is to take back the code to break the cyclic reference. Please anyone who is familiar with this part of historic code help to review the patch. Thanks.
Take the defect. "zhangjf" committed SVN revision 1383401 into trunk: #i120828#, retore some ChartModel::dispose() code to break cyclic reference F... Change to resolved state |