|
The mi_var_copy() function creates a copy of a varying-length structure.
The mi_var_copy() function copies the varying-length structure that varlen_ptr references and returns a pointer to the newly allocated copy. The function is a constructor function for a varying-length structure. It creates a varying-length structure with a new data portion whose size is the same as the original varying-length structure (which varlen_ptr references).
The mi_var_copy() function allocates a new varying-length structure with the current memory duration.
You must use with the mi_var_free() function to free this structure when it is no longer needed.
Important: Do not use the DataBlade API memory-management functions such as mi_alloc() to allocate a varying-length structure.
Return Values
Related Topics
See the description of the following functions: mi_lvarchar_to_string(), mi_new_var(), mi_string_to_lvarchar(), mi_var_free(), and mi_var_to_buffer().
For more information, see Managing Memory for a Varying-Length Structure.