diff options
author | Jian Fang Zhang <zhangjf@apache.org> | 2012-09-11 12:30:18 +0000 |
---|---|---|
committer | Jian Fang Zhang <zhangjf@apache.org> | 2012-09-11 12:30:18 +0000 |
commit | 4cb73634a602272d8de33dfe23722912e4494bbc (patch) | |
tree | 50d3d8788984725c1d8cd3f534345fded82934d2 /chart2 | |
parent | 1c564cb9a46fc6435750f9f1a70f654b52efd970 (diff) |
#i120831#, call dispose() from ChartView dtor to make sure SfxBaseModel object is freed correctly
Found by: zhangjf
Patch by: zhangjf
Notes
Notes:
merged as: 8196dab4f450d96905f0bbfe650ae7a78c8972e2
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index de96be6eabc0..056e07c45dd5 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -207,6 +207,12 @@ void SAL_CALL ChartView::initialize( const uno::Sequence< uno::Any >& aArguments ChartView::~ChartView() { + // #i120831#. In ChartView::initialize(), m_xShapeFactory is created from SdrModel::getUnoModel() and indirectly + // from SfxBaseModel, it needs call dispose() to make sure SfxBaseModel object is freed correctly. + uno::Reference< lang::XComponent > xComp( m_xShapeFactory, uno::UNO_QUERY); + if ( xComp.is() ) + xComp->dispose(); + if( m_pDrawModelWrapper.get() ) { EndListening( m_pDrawModelWrapper->getSdrModel(), sal_False /*bAllDups*/ ); |