Author: zhangjf
Date: Tue Sep 11 13:30:18 2012
New Revision: 1383407

URL: http://svn.apache.org/viewvc?rev=1383407&view=rev
Log:
#i120831#, call dispose() from ChartView dtor to make sure SfxBaseModel object 
is freed correctly 

Found by: zhangjf 
Patch by: zhangjf

Modified:
    incubator/ooo/trunk/main/chart2/source/view/main/ChartView.cxx

Modified: incubator/ooo/trunk/main/chart2/source/view/main/ChartView.cxx
URL: 
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/chart2/source/view/main/ChartView.cxx?rev=1383407&r1=1383406&r2=1383407&view=diff
==============================================================================
--- incubator/ooo/trunk/main/chart2/source/view/main/ChartView.cxx (original)
+++ incubator/ooo/trunk/main/chart2/source/view/main/ChartView.cxx Tue Sep 11 
13:30:18 2012
@@ -207,6 +207,12 @@ void SAL_CALL ChartView::initialize( con
 
 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*/ );


Reply via email to