Deletion of vcl::Window's inside ToolBar

Dennis Francis at
Wed Sep 2 08:15:35 PDT 2015

Hi Maxim

>From the FontList methods, it looks like it uses GetDevFontSize(),
GetMapMode(), SetMapMode() and GetDevFontSizeCount() methods of
the object that is passed to FontList constructor. All these methods are
only defined for OutputDevice class. So it would seem that passing the
parent window should have
the same effect. Valgrind no more shows that memleak if we pass

Should I remove the newly added dispose() functions (for FontList etc..) as
well ? Seems the above one liner change is enough to kill the memleak.


On Tue, Sep 1, 2015 at 2:56 AM, Maxim Monastirsky <momonasmon at>

> Hi,
> On Mon, Aug 31, 2015 at 10:00 PM, Dennis Francis <
> at> wrote:
>> About passing SvxFontNameBox_Impl : I have not yet understood why we pass
>> that, will check as soon as possible.
> I will clarify what I meant. It seems to me that we pass the
> SvxFontNameBox_Impl only to get through it the font list from the
> underlying platform backend. In this case, we can do the same with other
> windows. For example, passing the ToolBox there (via pBox->GetParent())
> seems to eliminate the memleak, while the font box seems (at least at first
> glance) to still work as expected. But you should take this with caution,
> given that I'm not really familiar with the font init stuff.
> Maxim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the LibreOffice mailing list