gd_free_entry_strings - Man Page
free strings in a GetData gd_entry_t object
Synopsis
#include <getdata.h>
gd_entry_t *gd_free_entry_strings(gd_entry_t *entry);
Description
The gd_free_entry_strings() function frees the character strings found in the gd_entry_t object entry which were previously allocated by a call to gd_entry(3). After freeing a string, the associated pointer is set to NULL. If entry is NULL, this function does nothing.
If non-NULL, entry must point to a valid and properly initialised gd_entry_t object, such as that returned by gd_entry(3). By default, strings are deallocated by calling free(3) on each, but a different memory manager may be specified by calling gd_alloc_funcs(3) before calling this function.
See gd_entry(3) for a description of the gd_entry_t data type.
Return Value
The function gd_free_entry_strings() always returns its input, entry.
Notes
This function is provided as a convenience only. The caller may deallocate the strings in the gd_entry_t object provided by gd_entry(3) itself simply by calling the deallocator on the each initialised string member, if they prefer to do so.
History
The dirfile_free_entry_strings() function appeared in GetData-0.3.0.
In GetData-0.7.0, this function was renamed to gd_free_entry_strings().
See Also
Referenced By
gd_alloc_funcs(3), gd_entry(3), gd_error(3).