The mi_lo_stat_free() function

The mi_lo_stat_free() function frees an LO-status structure.

Syntax

mi_integer mi_lo_stat_free(conn, LO_stat)
   MI_CONNECTION *conn;
   MI_LO_STAT *LO_stat;
conn
This value is one of the following connection values:

A pointer to a connection descriptor established by a previous call to mi_open(), mi_server_connect(), or mi_server_reconnect().

A NULL-valued pointer (database server only)

LO_stat
A pointer to an LO-status structure that mi_lo_stat_free() deallocates.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_lo_stat_free() function frees the LO-status structure that LO_stat references. This function is the destructor for the LO-status structure.
Restriction: Do not use system memory-allocation calls (such as free() or mi_free()) to perform memory management for LO-status structures.
When your application no longer needs status information, call mi_lo_stat_free() for each LO-status structure that the mi_lo_stat() function has allocated. Once freed, these resources can be reallocated to other structures.
Restriction: Do not call the mi_lo_stat_free() function for the same LO-status structure more than once. This behavior is analogous to the behavior of the free() system function for regular memory allocation.
Server only: The mi_lo_stat_free() function does not need a connection descriptor to execute. If your UDR does not need a valid connection for other operations, you can specify a NULL-valued pointer for the conn parameter to establish a NULL connection. For information about the advantages of a NULL connection, see the HCL OneDB™ DataBlade® API Programmer's Guide.

Return values

MI_OK
The function was successful.
MI_ERROR
The function was not successful. One of the arguments is invalid.