diff options
author | Jian Fang Zhang <zhangjf@apache.org> | 2012-09-11 12:30:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-31 14:59:59 +0100 |
commit | 8196dab4f450d96905f0bbfe650ae7a78c8972e2 (patch) | |
tree | e3ebcec3747429b7f018cec7ec3e15f48caefff2 /chart2 | |
parent | 275225ed4d401d306c75de92fb980a6a3f85c635 (diff) |
Resolves: #i120831# call dispose() from ChartView dtor...
to make sure SfxBaseModel object is freed correctly
Found by: zhangjf
Patch by: zhangjf
(cherry picked from commit 4cb73634a602272d8de33dfe23722912e4494bbc)
Change-Id: I9e316178ef273b13e77d0b166f17fc700363f7bb
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 e5ae969c483d..a19a4130914e 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -200,6 +200,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(), false /*bAllDups*/ ); |