mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-21 22:59:16 +02:00
Bug 500361 – Improve docs for g_array_free() and g_ptr_array_free()
2007-11-29 Behdad Esfahbod <behdad@gnome.org> Bug 500361 – Improve docs for g_array_free() and g_ptr_array_free() * glib/tmpl/arrays.sgml: * glib/tmpl/arrays_pointer.sgml: Document how to free the return value. svn path=/trunk/; revision=5998
This commit is contained in:
parent
d80f09239e
commit
f3be1cf2d1
@ -1,3 +1,11 @@
|
|||||||
|
2007-11-29 Behdad Esfahbod <behdad@gnome.org>
|
||||||
|
|
||||||
|
Bug 500361 – Improve docs for g_array_free() and g_ptr_array_free()
|
||||||
|
|
||||||
|
* glib/tmpl/arrays.sgml:
|
||||||
|
* glib/tmpl/arrays_pointer.sgml:
|
||||||
|
Document how to free the return value.
|
||||||
|
|
||||||
2007-11-28 Matthias Clasen <mclasen@redhat.com>
|
2007-11-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gio/gio-sections.txt: More cleanup
|
* gio/gio-sections.txt: More cleanup
|
||||||
|
@ -298,12 +298,13 @@ the underlying array for use elsewhere.
|
|||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
If array elements contain dynamically-allocated memory, they should be freed
|
If array elements contain dynamically-allocated memory, they should be freed
|
||||||
first.
|
separately.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
@array: a #GArray.
|
@array: a #GArray.
|
||||||
@free_segment: if %TRUE the actual element data is freed as well.
|
@free_segment: if %TRUE the actual element data is freed as well.
|
||||||
@Returns: the element data if @free_segment is %FALSE, otherwise %NULL
|
@Returns: the element data if @free_segment is %FALSE, otherwise %NULL.
|
||||||
|
The element data should be freed using g_free().
|
||||||
|
|
||||||
|
|
||||||
|
@ -227,14 +227,22 @@ Returns the pointer at the given index of the pointer array.
|
|||||||
|
|
||||||
<!-- ##### FUNCTION g_ptr_array_free ##### -->
|
<!-- ##### FUNCTION g_ptr_array_free ##### -->
|
||||||
<para>
|
<para>
|
||||||
Frees all of the memory allocated for the pointer array.
|
Frees the memory allocated for the #GPtrArray.
|
||||||
|
If @free_segment is %TRUE it frees the memory block holding the elements
|
||||||
|
as well. Pass %FALSE if you want to free the #GPtrArray wrapper but preserve
|
||||||
|
the underlying array for use elsewhere.
|
||||||
</para>
|
</para>
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
If array contents point to dynamically-allocated memory, they should be freed
|
||||||
|
separately.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
|
||||||
@array: a #GPtrArray.
|
@array: a #GPtrArray.
|
||||||
@free_seg: if %TRUE the array of pointers (@pdata) is freed.
|
@free_seg: if %TRUE the actual pointer array is freed as well.
|
||||||
@Returns: %NULL if @free_seg is %TRUE, otherwise the array of
|
@Returns: the pointer array if @free_seg is %FALSE, otherwise %NULL.
|
||||||
pointers (@pdata) is returned.
|
The pointer array should be freed using g_free().
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION g_ptr_array_foreach ##### -->
|
<!-- ##### FUNCTION g_ptr_array_foreach ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user