<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:serval2412@yahoo.fr" title="Julien Nabet <serval2412@yahoo.fr>"> <span class="fn">Julien Nabet</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - PaletteManager::LoadPalettes() leaks memory"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=111894">bug 111894</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>noelgrandin@gmail.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - PaletteManager::LoadPalettes() leaks memory"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=111894#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - PaletteManager::LoadPalettes() leaks memory"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=111894">bug 111894</a>
from <span class="vcard"><a class="email" href="mailto:serval2412@yahoo.fr" title="Julien Nabet <serval2412@yahoo.fr>"> <span class="fn">Julien Nabet</span></a>
</span></b>
<pre>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 ?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>