The mi_free() function
The mi_free() routine frees the user memory that was previously allocated with the mi_alloc(), mi_dalloc(), or mi_zalloc() function.
Syntax
void mi_free(ptr)
void *ptr;
- ptr
- A pointer to memory that mi_alloc(), mi_dalloc(), or mi_zalloc() previously allocated.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
The mi_free() function frees the user memory that ptr references. This function behaves like the free() system call, except that it frees memory that one of the DataBlade® API memory-management routines allocated. The mi_free() function does not free memory allocated with malloc(). To conserve resources, use the mi_free() function to deallocate the user memory explicitly when your DataBlade® API module no longer needs it. The mi_free() function is the destructor function for user memory. If you do not explicitly free user memory, the database server frees it when its memory duration expires.
Return values
None.