Re: resizing tables with widget and unref
- From: Havoc Pennington <hp redhat com>
- To: rhfreeman <rhfreeman micron com>
- Cc: "'gtk-list gnome org'" <gtk-list gnome org>
- Subject: Re: resizing tables with widget and unref
- Date: 22 Jun 2000 12:11:42 -0400
rhfreeman <rhfreeman@micron.com> writes:
> static void remove_list_from_panel(GtkWidget *widget, GtkWidget *main_vbox)
> {
> gtk_widget_ref(remove_list);
> gtk_container_remove(GTK_CONTAINER(main_vbox), remove_list);
> remove_list->parent=NULL;
Ugh, don't do that! You can't manually change private struct fields.
> gtk_widget_unref(remove_list);
> gtk_widget_destroy(widget);
> gtk_object_destroy(GTK_OBJECT(remove_list));
Why do you gtk_object_destroy the list, if you already removed it? You
don't even know remove_list is a valid object here, there are no
outstanding references to it.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]