[glib] Added note in g_slist_free about using *free_full to mirror GList docs
- From: Chris Kühl <chriskuehl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Added note in g_slist_free about using *free_full to mirror GList docs
- Date: Sun, 5 Dec 2010 23:38:34 +0000 (UTC)
commit 8530a3b029b7f691284d74e6e0c7883ba4a14725
Author: Chris Kühl <chrisk openismus com>
Date: Mon Dec 6 00:34:43 2010 +0100
Added note in g_slist_free about using *free_full to mirror GList docs
glib/gslist.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/glib/gslist.c b/glib/gslist.c
index f6581a8..f8e7dcd 100644
--- a/glib/gslist.c
+++ b/glib/gslist.c
@@ -159,6 +159,12 @@ g_slist_alloc (void)
*
* Frees all of the memory used by a #GSList.
* The freed elements are returned to the slice allocator.
+ *
+ * <note><para>
+ * If list elements contain dynamically-allocated memory,
+ * you should either use g_slist_free_full() or free them manually
+ * first.
+ * </para></note>
*/
void
g_slist_free (GSList *list)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]