![]() |
|
Use the DEALLOCATE ROW statement to release memory for a row variable that was previously allocated with the ALLOCATE ROW statement.
Use this statement with ESQL/C.
The DEALLOCATE ROW statement frees all the memory that is associated with the ESQL/C row variable that variable identifies. You must explicitly release memory resources for a row variable with DEALLOCATE ROW. Otherwise, deallocation occurs automatically at the end of the program.
The DEALLOCATE COLLECTION statement releases resources for both typed and untyped row variables.
Tip: The DEALLOCATE ROW statement deallocates memory for an ESQL/C row variable only. To deallocate memory for an ESQL/C collection variable, use the DEALLOCATE COLLECTION statement.
If you deallocate a nonexistent row variable or a variable that is not an ESQL/C row variable, an error results. Once you deallocate a row variable, you can use the ALLOCATE ROW statement to reallocate resources, and you can then reuse a row variable.
The following example shows how to deallocate resources for the row variable, a_row, with the DEALLOCATE ROW statement:
Related statements: ALLOCATE ROW and DEALLOCATE COLLECTION
For a discussion of row types, see the Informix Guide to SQL: Tutorial.
For a discussion of complex data types, see the Informix ESQL/C Programmer's Manual.