summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-09-19 09:10:41 +0200
committerJulien Nabet <serval2412@yahoo.fr>2017-09-19 09:33:07 +0200
commit324d7f28beaf36c91361debf478e74b9fced7bfb (patch)
tree6f525f5d013958f58dc380be9d50745eceb939b1
parentaa67a58c114338e90c589e5916f94a77f89cd727 (diff)
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 61d85c4e7c30ea0f5242d927b7456190020b4fbe. Change-Id: I0d88a5f5806cb5d3b9f3a5ebb0c7baed968469ec Reviewed-on: https://gerrit.libreoffice.org/42445 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 07582e68d56c..ea33ee769209 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3233,6 +3233,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();
@@ -3343,11 +3344,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();