GPtrArray* g_ptr_array_new_take_null_terminated ( gpointer* data, GDestroyNotify element_free_func )
Creates a new
data as pointers, computing the length of it
and setting the reference count to 1.
This avoids having to copy such data manually.
data will eventually be
freed using g_free(), so must have been allocated with a suitable allocator.
The length is calculated by iterating through
data until the first
element is found.
It also sets
element_free_func for freeing each element when the array is
destroyed either via g_ptr_array_unref(), when
g_ptr_array_free() is called
free_segment set to
TRUE or when removing elements.
Do not use it if the
data length is greater than
stores the length of its data in #guint, which may be shorter than
Available since: 2.76
This function is not directly available to language bindings.
Type: An array of
An array of pointers,
NULLfor an empty array.
The argument can be
The array must be
The called function takes ownership of the data, and is responsible for freeing it.
A function to free elements on