ec_free
Name
ec_free — Free memory allocated
Synopsis
#include "ec_malloc.h"
| void **ec_free** (
| object_type, | |
| | ptr)
; | |
int <var class="pdparam">object_type</var>
;
void * <var class="pdparam">ptr</var>
;
Description
Returns memory allocated by ec_malloc
, ec_malloc_size
or ec_realloc
to the allocator layer, ready for reuse.
Other functions which allocate memory and must use ec_free
are and ec_mt_strdup
ec_mt_strndup
. Note: ec_strdup
and ec_strndup
are macros that invoke the preceding functions so memory allocated by these functions must also use ec_free
.
- object_type
-
One of the memory types enumerated at the section called “Memory Types”.
- ptr
-
A pointer to the memory location.
This function returns void.
It is legal to call this function in any thread.
See Also
ec_malloc, ec_malloc_size, ec_realloc, ec_mt_strndup and ec_mt_strdup.