Author: arielch Date: Mon Apr 7 23:53:55 2014 New Revision: 1585624 URL: http://svn.apache.org/r1585624 Log: i124623 - Dispose extension's Options page to avoid memory leaks
Modified: openoffice/trunk/main/cui/source/options/treeopt.cxx Modified: openoffice/trunk/main/cui/source/options/treeopt.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/options/treeopt.cxx?rev=1585624&r1=1585623&r2=1585624&view=diff ============================================================================== --- openoffice/trunk/main/cui/source/options/treeopt.cxx (original) +++ openoffice/trunk/main/cui/source/options/treeopt.cxx Mon Apr 7 23:53:55 2014 @@ -2679,6 +2679,22 @@ ExtensionsTabPage::~ExtensionsTabPage() { Hide(); DeactivatePage(); + + if ( m_xPage.is() ) + { + Reference< XComponent > xComponent( m_xPage, UNO_QUERY ); + if ( xComponent.is() ) + { + try + { + xComponent->dispose(); + } + catch ( const Exception & ) + { + } + } + m_xPage.clear(); + } } // -----------------------------------------------------------------------