Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


On Fri, 2015-08-21 at 23:51 +0530, Dennis Francis wrote:
Hi all,

I am trying to understand where the SvxFontNameBox_Impl objects are 
deallocated. With help from 
gdb and opengrok, I found that it is held in ImplToolItem::mpWindow. 
But in ImplToolItem destructor it says clearly not to remove mpWindow 
as a comment.


ImplToolItem::~ImplToolItem() { 
// don't dispose mpWindow - we get copied around.
}

Digging into the other examples, I guess that SetItemWindow was called
on the toolbar with the SvxFontNameBox_Impl window as an argument ?

If that's the case then the pattern appears to be that what object
called SetItemWindow on the toolbar should call SetItemWindow(id, 0) to
remove the window from the toolbar and then call disposeAndClear on the
window.

i.e. what entity put the item into the toolbar is the same entity that
has to remove it and dispose it.

What's the reproducing scenario here, is it the fontname widget in the
standard toolbar, e.g. just start and exit writer to reproduce ?

C.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.