z/OS Language Environment Writing Interlanguage Communication Applications
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using storage functions in C++ to PL/I ILC

z/OS Language Environment Writing Interlanguage Communication Applications
SA38-0684-00

Use the following guidelines when mixing HLL storage constructs and Language Environment storage services.

The C++ new and delete statements should not be mixed with the C malloc() and free() statements. Storage allocated with new can be deallocated only with delete and vice versa.

Storage allocated using the PL/I ALLOCATE statement that:
  • Is within a PL/I AREA, or
  • Is of the storage class CONTROLLED, or
  • Has the REFER option
must be released by the PL/I FREE statement. Storage with these characteristics cannot be released by the Language Environment callable service CEEFRST or by an HLL construct such as the C++ free() function.
Storage allocated as a result of the PL/I ALLOCATE statement that is of the storage class BASED can be released by CEEFRST or an HLL construct such as the C++ free() function if the structure:
  • Is completely declared,
  • Requires no pad bytes to be added automatically by the compiler, and
  • Does not contain the REFER option

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014