The mi_var_free() function

The mi_var_free() function frees the specified varying-length structure.

Syntax

mi_integer mi_var_free (varlen_ptr)
   mi_lvarchar *varlen_ptr
varlen_ptr
The pointer to the varying-length structure to free.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_var_free() function is a destructor function for a varying-length structure. It frees the varying-length structure that varlen_ptr references. Use mi_var_free() to explicitly free varying-length structures that you have allocated with the mi_new_var() function or that the mi_string_to_lvarchar() function has allocated.
Restrictioni: Do not use the DataBlade® API memory-management function mi_free() to deallocate a varying-length structure.

Return values

MI_OK
The function was successful.
MI_ERROR
The function was not successful.