Allocate memory
If the HCL® Informix® GLS function allocates memory, this memory is only allocated within the function itself and is freed before the function returns.
No Informix® GLS library function allocates memory that remains after the function returns. Therefore, you must allocate any memory for data that the Informix® GLS function needs or returns.
DataBlade® UDRs can assume that the Informix® GLS functions allocate memory with a PER_ROUTINE memory duration.
You must ensure that memory is allocated for any return value or argument that the Informix® GLS function provides to the calling program.
Tip: You must also handle memory allocation for multibyte-character and wide-character
strings that the Informix® GLS functions
use.