[Libreoffice-commits] core.git: Branch 'aoo/trunk' - cui/source

Ariel Constenla-Haile arielch at apache.org
Mon Apr 7 17:07:55 PDT 2014


 cui/source/options/treeopt.cxx |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

New commits:
commit 363c5553b7386da80abef818a196f5cf7d353ae0
Author: Ariel Constenla-Haile <arielch at apache.org>
Date:   Mon Apr 7 23:53:55 2014 +0000

    i124623 - Dispose extension's Options page to avoid memory leaks

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 8928896..e8df439 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();
+    }
 }
 
 // -----------------------------------------------------------------------


More information about the Libreoffice-commits mailing list