![]() |
O2S C Library 1.8.2
Provide high-level data-structures and other fundamental tools for C projects
|
Create and destroy dynamic arrays. More...
Go to the source code of this file.
Functions | |
array_t | array_new (size_t type_size) |
Contructs an empty array, no memory is allocated. | |
void | array_clear (array_t *self) |
Clears properly the array. | |
void | array_clear_f (array_t *self, void(*cleanup)(void *)) |
Release the resources of each elements before clearing the array. |
Create and destroy dynamic arrays.
Definition in file constructors_destructors.c.
void array_clear | ( | array_t * | self | ) |
Clears properly the array.
Frees the underlying storage, and leaves the array in a usable state
Definition at line 33 of file constructors_destructors.c.
void array_clear_f | ( | array_t * | self, |
void(* | cleanup )(void *) ) |
Release the resources of each elements before clearing the array.
In the case of an array storing elements that own resources, each element should be cleaned up before the array is emptied.
Definition at line 47 of file constructors_destructors.c.