GtkBox memory leak?


I'm currently implementing a custom container widget and I've been using the source code for GtkBox as as reference (, revision 21712). I'm wondering whether I've found a bug or if there is something I am missing about container destruction:

In 'gtkbox.c: gtk_box_pack ()', every time a new child is added to a GtkBox container, a GtkBoxChild object is created and stored in the GtkBox's children GList. When gtk_box_remove() is called to remove a child widget from a GtkBox container, the associated GtkBoxChild object is destroyed. When a GtkBox container itself is destroyed, its parent invokes 'gtk_box_forall' passing gtk_widget_destroy as the callback to destroy all the container's child widgets. What I cannot see is how, in the latter case, all the GtkBoxChild objects associated with the child widgets are destroyed. Is there some hidden mechanism at play here, or is there a bug?

If I could get mtrace to show me some symbol names, I'd have a better idea about what's going on, but I can't get that to work right now.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]