GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

gtk_notebook_remove_page destroys the child widget right?

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
Micah Carrick
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 505
Location: Portland, OR USA

PostPosted: Sun Dec 17, 2006 3:44 am    Post subject: gtk_notebook_remove_page destroys the child widget right? Reply with quote

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

PostPosted: Sun Dec 17, 2006 4:06 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP