Free a row structure
- The mi_row_free() function frees the row.
- The current memory duration expires. (Server only)
- The mi_close() function closes the current connection.
To conserve resources, use the mi_row_free() function to explicitly deallocate the row once your DataBlade API module no longer needs it. The mi_row_free() function is the destructor function for a row structure. It frees the row and any resources that are associated with it.
In a C UDR, the row structure and row descriptor are part of the same data type structure. The mi_row_create() function just adds a data buffer, which holds the column values of a row, to the row descriptor. The mi_row_free() function drops the row structure from the row descriptor. It is useful for big rows where the data you want has already been examined.
However, the mi_row_desc_free() function frees a row descriptor and the associated row structure. After mi_row_desc_free() frees the row descriptor, you no longer have access to the row structure. Examine the contents of a row structure before you deallocate the row descriptor with mi_row_desc_free().