From d4d28a97106aaef125fb46808c5d992b0b3a59f8 Mon Sep 17 00:00:00 2001 From: Ariel Constenla-Haile Date: Mon, 7 Apr 2014 23:53:55 +0000 Subject: Resolves: #i124623# Dispose extension's Options page to avoid memory leaks (cherry picked from commit 363c5553b7386da80abef818a196f5cf7d353ae0) Change-Id: Ic04b523f5f9d4092889b3ad59569f02946091652 --- cui/source/options/treeopt.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'cui') 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(); + } } -- cgit