[Libreoffice-commits] core.git: svx/source

Julien Nabet serval2412 at yahoo.fr
Tue Sep 19 07:10:15 UTC 2017


 svx/source/tbxctrls/tbcontrl.cxx |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit fa9dc42ec1b0a61d7c49ecf9a4eb804bac8835fa
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Sep 19 09:08:39 2017 +0200

    Revert "tdf#111894: fix leak memory with PaletteManager with SvxColorListBox"
    
    See Maxim's comment here: https://gerrit.libreoffice.org/#/c/42138/2/svx/source/tbxctrls/tbcontrl.cxx
    
    This reverts commit e40ba034fa01cc271ad0e1940f623e551793f80b.
    
    Change-Id: Ife914669ce9fa08f4ea0e0b03389eab76f030ac4
    Reviewed-on: https://gerrit.libreoffice.org/42444
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    Tested-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 196f63e5956b..cbd1c7c1d056 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3237,6 +3237,7 @@ void SvxColorListBox::SetSlotId(sal_uInt16 nSlotId, bool bShowNoneButton)
 {
     m_nSlotId = nSlotId;
     m_bShowNoneButton = bShowNoneButton;
+    m_xColorWindow.disposeAndClear();
     m_aSelectedColor = bShowNoneButton ? GetNoneColor() : GetAutoColor(m_nSlotId);
     ShowPreview(m_aSelectedColor);
     createColorWindow();
@@ -3346,11 +3347,6 @@ SvxColorListBox::~SvxColorListBox()
 
 void SvxColorListBox::dispose()
 {
-    // TODO: reset should be made automatically but...
-    // tdf#111894: avoid memory leak with PaletteManager with SvxColorListBox
-    // m_xColorWindow is made with m_xPaletteManager
-    // so reset this last one before disposeAndClear first one
-    m_xPaletteManager.reset();
     m_xColorWindow.disposeAndClear();
     m_aColorWrapper.dispose();
     MenuButton::dispose();


More information about the Libreoffice-commits mailing list