GNOME Bugzilla – Bug 743286
Mention that the path returned by gtk_tree_row_reference_get_path needs to be freed
Last modified: 2015-01-24 21:16:55 UTC
Valgrind pointed out to me that the GtkTreePath returned by gtk_tree_row_reference_get_path needs to be freed. It would be nice if the documentation mentioned that because GtkTreeRowReference is created from a path and one might think that it is returning its internal copy.
Created attachment 295080 [details] [review] GtkTreeModel: Documentation fix
Review of attachment 295080 [details] [review]: ::: gtk/gtktreemodel.c @@ +2402,3 @@ * + * Returns: (transfer full): a current path, or %NULL. The returned + * path should be freed with gtk_tree_path_free() when no longer the annotation ought to be enough. it should also include (nullable). we're kind of moving away from explicitly mentioning the free_func in documentation, since we're going to generate documentation for non-C languages from the same source, and the free function won't apply to, say, JavaScript or Python.
(In reply to comment #2) Thanks for taking look, Emmanuele. > Review of attachment 295080 [details] [review]: > > ::: gtk/gtktreemodel.c > @@ +2402,3 @@ > * > + * Returns: (transfer full): a current path, or %NULL. The returned > + * path should be freed with gtk_tree_path_free() when no longer > > the annotation ought to be enough. it should also include (nullable). > > we're kind of moving away from explicitly mentioning the free_func in > documentation, since we're going to generate documentation for non-C languages > from the same source, and the free function won't apply to, say, JavaScript or > Python. Ok, I will fix that.
Created attachment 295091 [details] [review] GtkTreeModel: Documentation fix
Attachment 295091 [details] pushed as aa0811d - GtkTreeModel: Documentation fix