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. _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice