 |
GTK+ Forums Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
|
|
|
| Author |
Message |
|
|
Micah Carrick Never Seen the Sunlight
Joined: 21 Sep 2005 Posts: 505 Location: Portland, OR USA
|
Posted: Sun Dec 17, 2006 3:44 am Post subject: gtk_notebook_remove_page destroys the child widget right? |
|
|
| gtk_notebook_remove_page destroys the child widget right? |
|
| Back to top |
|
 |
openldev Never Seen the Sunlight
Joined: 21 Sep 2005 Posts: 387 Location: Fairfax, Virginia
|
Posted: Sun Dec 17, 2006 4:06 am Post subject: |
|
|
gtk_notebook_remove_page() calls gtk_container_remove(). This function will _usually_ destroy the child widget, but not always. It simply decreases the reference count of the GObject. If that is the last reference to the widget, then it will be destroyed. This is useful because you can use g_object_ref() to add a reference count to an object so that it can be added to a different part of the UI after it is removed from its original container.
Reference counting is some cool beans ... |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group CodeBB 1.0 Beta 2
|