DEALLOCATE ROW statement

Use the DEALLOCATE ROW statement to release memory for a ROW variable.

This statement is an extension to the ANSI/ISO standard for SQL. Use this statement with ESQL/C.

Syntax

DEALLOCATE ROW :variable
Element Description Restrictions Syntax
variable Typed or untyped row variable Must be declared and allocated Language specific

Usage

DEALLOCATE ROW frees all the memory that is associated with the Informix® ESQL/C typed or untyped row variable that variable identifies. If you do not explicitly release memory resources with DEALLOCATE ROW, deallocation occurs automatically at the end of the program. To deallocate memory for the Informix® ESQL/C collection variable, use the DEALLOCATE COLLECTION statement.

After 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, using the DEALLOCATE ROW statement:
EXEC SQL BEGIN DECLARE SECTION; row (a int, b int) a_row;
EXEC SQL END DECLARE SECTION;
. . .
EXEC SQL allocate row :a_row;
. . .
EXEC SQL deallocate row :a_row;