summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2014-04-07 23:53:55 +0000
committerAriel Constenla-Haile <arielch@apache.org>2014-04-07 23:53:55 +0000
commit363c5553b7386da80abef818a196f5cf7d353ae0 (patch)
tree999ebe4a54836ff88a7b5d69af80e3e6394af027 /cui
parent42c2b0cecfae5845439e0392a399497062238b15 (diff)
i124623 - Dispose extension's Options page to avoid memory leaks
Notes
Notes: merged as: d4d28a97106aaef125fb46808c5d992b0b3a59f8
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/treeopt.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 8928896b9a6d..e8df439ebe3a 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -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();
+ }
}
// -----------------------------------------------------------------------