summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2014-04-07 23:53:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-04-08 10:01:25 +0100
commitd4d28a97106aaef125fb46808c5d992b0b3a59f8 (patch)
tree7e49a7cef833db5694a0afd02aeccc01c32f4545 /cui/source
parent8ce32af6b28bbdcc6772ccb79838087a5c1a3432 (diff)
Resolves: #i124623# Dispose extension's Options page to avoid memory leaks
(cherry picked from commit 363c5553b7386da80abef818a196f5cf7d353ae0) Change-Id: Ic04b523f5f9d4092889b3ad59569f02946091652
Diffstat (limited to 'cui/source')
-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 fa5d8901f0ef..e5b1bf37d82d 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -2298,6 +2298,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();
+ }
}