Clarify memory management of tree models

It helps to be explicit about these things.
Bug 609264.
This commit is contained in:
Christian Dywan 2010-08-09 21:35:26 -04:00 committed by Matthias Clasen
parent 0824862e3b
commit 2a12f74c8e
3 changed files with 9 additions and 3 deletions

View File

@ -986,7 +986,9 @@ gtk_list_store_set_valist (GtkListStore *list_store,
* The list is terminated by a -1. For example, to set column 0 with type
* %G_TYPE_STRING to "Foo", you would write <literal>gtk_list_store_set (store, iter,
* 0, "Foo", -1)</literal>.
* The value will be copied or referenced by the store if appropriate.
*
* The value will be referenced by the store if it is a %G_TYPE_OBJECT, and it
* will be copied if it is a %G_TYPE_STRING or %G_TYPE_BOXED.
**/
void
gtk_list_store_set (GtkListStore *list_store,

View File

@ -1415,8 +1415,10 @@ gtk_tree_model_unref_node (GtkTreeModel *tree_model,
* write: <literal>gtk_tree_model_get (model, iter, 0, &amp;place_string_here, -1)</literal>,
* where <literal>place_string_here</literal> is a <type>gchar*</type> to be
* filled with the string.
* If appropriate, the returned values have to be freed or unreferenced.
*
* Returned values with type %G_TYPE_OBJECT have to be unreferenced, values
* with type %G_TYPE_STRING or %G_TYPE_BOXED have to be freed. Other values are
* passed by value.
**/
void
gtk_tree_model_get (GtkTreeModel *tree_model,

View File

@ -1073,7 +1073,9 @@ gtk_tree_store_set_valist (GtkTreeStore *tree_store,
* The list is terminated by a -1. For example, to set column 0 with type
* %G_TYPE_STRING to "Foo", you would write
* <literal>gtk_tree_store_set (store, iter, 0, "Foo", -1)</literal>.
* The value will be copied or referenced by the store if appropriate.
*
* The value will be referenced by the store if it is a %G_TYPE_OBJECT, and it
* will be copied if it is a %G_TYPE_STRING or %G_TYPE_BOXED.
**/
void
gtk_tree_store_set (GtkTreeStore *tree_store,