containers and reference counting
- From: Ron Steinke <rsteinke merilon elfhame net>
- To: gtk-list gnome org
- Subject: containers and reference counting
- Date: Fri, 17 Nov 2000 11:39:47 -0800
I'm counfused about how reference counting works when widgets are
added to containers. Let's say I have the code
GtkBin *bin;
GtkWidget *widget;
... (create the bin, widget)
gtk_container_add(GTK_CONTAINER(bin), widget);
Does the add increment the reference count for widget? Do I
need to gtk_widget_unref(widget) here?
If I later do
gtk_container_remove(GTK_CONTAINER(bin), widget);
does the remove unref the widget? Do I still have a widget, or
has it been destroyed?
Ron Steinke
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]