From 1c564cb9a46fc6435750f9f1a70f654b52efd970 Mon Sep 17 00:00:00 2001 From: Jian Fang Zhang Date: Tue, 11 Sep 2012 12:20:33 +0000 Subject: #i120828#, retore some ChartModel::dispose() code to break cyclic reference Found by: zhangjf Patch by: zhangjf --- chart2/source/model/main/ChartModel.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'chart2') diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index f0ea63339987..0dd47f13954f 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -565,6 +565,9 @@ void SAL_CALL ChartModel::dispose() throw(uno::RuntimeException) m_pUndoManager.clear(); // that's important, since the UndoManager implementation delegates its ref counting to ourself. + if( m_xOldModelAgg.is()) // #i120828#, to release cyclic reference to ChartModel object + m_xOldModelAgg->setDelegator( 0 ); + m_aControllers.disposeAndClear( lang::EventObject( static_cast< cppu::OWeakObject * >( this ))); m_xCurrentController.clear(); -- cgit