Home | Previous Page | Next Page   Function Descriptions >

mi_row_free( )

The mi_row_free( ) function frees a row structure.

Syntax

mi_integer mi_row_free(row)
   MI_ROW *row;
row
is a pointer to the row structure to be freed.
Valid in Client LIBMI Application? Valid in User-Defined Routine?
Yes Yes

Usage

The mi_row_free( ) function frees the row structure that row references. This function is the destructor function for a row structure. Use mi_row_free( ), however, only to free a row structure that mi_row_create( ) created. Do not use mi_row_free( ) to free a row structure that a DataBlade API function allocated. For example, do not use mi_row_free( ) to free the row structure for the current statement, which the mi_next_row( ) function accesses.

Server Only

In a C UDR, the row structure and row descriptor are part of the same data structure. The row structure is just a data buffer in the row descriptor that holds copies of the column values of a row. The mi_row_free( ) function frees this data buffer and sets the pointer to this data buffer (within the row descriptor) to a NULL-valued pointer.

After a call to mi_row_free( ), the row structure is no longer accessible but the row descriptor is. However, the mi_row_desc_free( ) function frees both the row descriptor and its associated row structure. Therefore, after a call to mi_row_desc_free( ), neither the row structure nor the row descriptor are accessible. To explicitly free a row structure you have allocated with mi_row_create( ), call mi_row_free( ) before you free the row descriptor with mi_row_desc_free( ).

End of Server Only
Client Only

In a client LIBMI application, the row structure and row descriptor are separate data structures. The mi_row_free( ) function only frees a row structure. It does not affect the associated row descriptor.

End of Client Only

Return Values

MI_OK
indicates that the function was successful.
MI_ERROR
indicates that the function was not successful.

Related Topics

See also the descriptions of mi_next_row( ), mi_row_create( ) and mi_row_desc_free( ).

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]