[Libreoffice-bugs] [Bug 111894] PaletteManager::LoadPalettes() leaks memory
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Tue Sep 5 19:10:00 UTC 2017
https://bugs.documentfoundation.org/show_bug.cgi?id=111894
Julien Nabet <serval2412 at yahoo.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |noelgrandin at gmail.com
--- Comment #9 from Julien Nabet <serval2412 at yahoo.fr> ---
Noel: trying to find where's the leak, I noticed 2 things:
In svx/source/tbxctrls/tbcontrl.cxx, the order of destruction in
1368 void SvxColorWindow::dispose()
1369 {
1370 mpColorSet.clear();
1371 mpRecentColorSet.clear();
1372 mpPaletteListBox.clear();
1373 mpButtonAutoColor.clear();
1374 mpButtonNoneColor.clear();
1375 mpButtonPicker.clear();
1376 mpAutomaticSeparator.clear();
1377 SfxPopupWindow::dispose();
1378 }
isn't the reverse ordering of construction:
1246 SvxColorWindow::SvxColorWindow(const OUString& rCommand,
...
1263 get(mpPaletteListBox, "palette_listbox");
1264 get(mpButtonAutoColor, "auto_color_button");
1265 get(mpButtonNoneColor, "none_color_button");
1266 get(mpButtonPicker, "color_picker_button");
1267 get(mpColorSet, "colorset");
1268 get(mpRecentColorSet, "recent_colorset");
1269 get(mpAutomaticSeparator, "separator4");
or is the order doesn't be taken into account because it seems there's no
parent-children relation for these vars?
Also, I wonder if using disposeAndClear may help here since we have this:
58 VclPtr<ListBox> mpPaletteListBox;
59 VclPtr<PushButton> mpButtonAutoColor;
60 VclPtr<PushButton> mpButtonNoneColor;
61 VclPtr<PushButton> mpButtonPicker;
62 VclPtr<FixedLine> mpAutomaticSeparator;
in include/svx/colorwindow.hxx ?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170905/88fa9f59/attachment.html>
More information about the Libreoffice-bugs
mailing list