summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-09-19 09:10:41 +0200
committerMichael Stahl <mstahl@redhat.com>2017-09-19 10:56:37 +0200
commit7509927b9e54c9b249a6a01adc02e8ebcbaf62f4 (patch)
tree4be8ed9450512bf256a36ac0968e408d0538814f
parent269d22cceebe55a3417fd9d423d846b92b99c9d3 (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: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 324d7f28beaf36c91361debf478e74b9fced7bfb) Reviewed-on: https://gerrit.libreoffice.org/42449 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-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();