summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2015-02-07 12:21:55 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2015-02-08 12:43:48 +0000
commite0d5ae394de81f136943e43f530df03e3197dc7b (patch)
tree68989693f0ee8ddcc87d43fbcff0a1e87447fc2e
parentf2cd87afa337591311cac815caa75874d3806289 (diff)
downloadglib-wip/refptr.tar.gz
docs: Mention g_string_ref_new() in g_strdup()wip/refptr
Instead of duplicating strings, using the reference counted version may be more efficient. https://bugzilla.gnome.org/show_bug.cgi?id=622721
-rw-r--r--glib/gstrfuncs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c
index 9498d8150..42e256f31 100644
--- a/glib/gstrfuncs.c
+++ b/glib/gstrfuncs.c
@@ -342,6 +342,9 @@ get_C_locale (void)
* The returned string should be freed with g_free()
* when no longer needed.
*
+ * You may want to use g_string_ref_new() in order to use
+ * reference counted strings, instead of duplicating them.
+ *
* Returns: a newly-allocated copy of @str
*/
gchar*