If I allocate memory for a widget, and then add a widget to a WContainerWidget
who is responsible for deleting the widget?
When I look at WContainerWidget.C, I see the following function:
void WContainerWidget::clear()
{
// first delete the widgets, this will also remove them from
// the layout
while (!children().empty()) {
WWidget *w = children().back();
//removeWidget(w);
delete w;
}
#ifndef WT_NO_LAYOUT
delete layout_;
layout_ = 0;
#endif // WT_NO_LAYOUT
}
=================================
Is WContainerWidget::clear() always called when a WContainerWidget is deleted?
When do I need to delete widgets that I allocated?
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest