gobject ref and unref ?
- From: Siddu <siddu sjce gmail com>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>, gtk-list <gtk-list gnome org>
- Subject: gobject ref and unref ?
- Date: Tue, 10 Nov 2009 23:14:24 +0530
How does one get to know if an API is adding a reference of its own to
Passed as a Parameter and thereby incrementing the ref_count ?
Is there any documentation available for it ? as to when to ref and
unref it based upon the api's ?
For example in the below code
gtk_tree_view_set_model() is adding a reference count of its own
to the store.
I have looked at the documentation for this , and it doesnt say
anything about it
store = gtk_list_store_new( );
for( i = 0; i < 5; i++ )
gtk_list_store_append( store, &iter );
gtk_list_store_set( store, &iter, ........
/* Set treeview's model */
gtk_tree_view_set_model( GTK_TREE_VIEW( treeview ),
GTK_TREE_MODEL( store ) );
g_object_unref( G_OBJECT( store ) );
Thanks in advance
I have never met a man so ignorant that i couldn't learn something from him
] [Thread Prev