An expansion to an earlier mail I sent... In this code snippet below I can observ that removing(destroying) container widgets does not have the desired effect. Please comment:>
Code snippet...........................................
cur_page = gtk_notebook_get_current_page( notebook );
fprintf( stderr, "on_notebook_switch_page,
switching from:%i to:%i\n", cur_page, page_n );
child = gtk_container_children(
GTK_CONTAINER(notebookpage[cur_page].widget));
while( child ) {
GtkWidget *widget;
widget = GTK_WIDGET(child->data);
gtk_container_remove(
GTK_CONTAINER(notebookpages[cur_page].widget),widget );
fprintf( stderr, "on_notebook_switch_page,
destroy widget:%p", widget);
gtk_widget_destroy( widget );
if( widget )
fprintf( stderr, " widget still referenced:%p\n", widget);
else
fprintf( stderr, "\n" );
child = child->next;
}
create_page_item( notebook, page_n );
example page item created..................................
case HDWR_CONF:
page_item = create_hardware_config();
gtk_container_add(GTK_CONTAINER(notebookpages[page_n].widget),
page_item);
To further enlighten, the widget returded by this routine as with all others does have reference count of at least 1 and sig connect is set for destroy_event on the top-level widget or this one returned.
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
- Re: memory leaks (continued)
- Re: memory leaks (continued) Paul Davis
- Re: memory leaks (continued) iain
- Re: memory leaks (continued) William Dulyea
