After your DataBlade API module no longer needs the row type (or row) that you allocated, you need to assess whether you can release resources that the row is using, specifically the row descriptor and the row structure.
A row structure has the current memory duration. A row remains valid until one of the following events occurs:
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. Once 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( ).
In a client LIBMI application, a row structure and a row descriptor are separate data type structures. When you free a row descriptor with mi_row_desc_free( ), the associated row structure is not freed. You must explicitly free the row structure with mi_row_free( ).
A row descriptor has the current memory duration. A row descriptor remains valid until one of the following events occurs:
To conserve resources, use the mi_row_desc_free( ) function to explicitly deallocate the row descriptor once your DataBlade API module no longer needs it. The mi_row_desc_free( ) function is the destructor function for a row descriptor. It frees the row descriptor 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_desc_free( ) function frees a row descriptor and the associated row structure. Once mi_row_desc_free( ) frees the row descriptor, you no longer have access to the row structure.
In a client LIBMI application, a row structure and a row descriptor are separate data type structures. When you free a row descriptor with mi_row_desc_free( ), the associated row structure is not freed. You must explicitly free the row structure with mi_row_free( ).