The RPG IV ALLOC and REALLOC and DEALLOC statements, and the %ALLOC,
%REALLOC and %DEALLOC BIFs all use the ILE activation group based heap.
If your program specifies DFTACTGRP(*YES) this storage will not be freed
until "end of job" (unless you specifically DEALLOC it.)
If your program specifies ACTGRP(*NEW), then this storage is freed as
soon as this program returns (when the *NEW activation group is
automatically reclaimed), unless explicitly DEALLOCated beforehand.
If your program specifies a named (persistent) activation group, the
storage is not freed until a RCLACTGRP is issued for that named
activation group, or end-of-job, unless explicitly DEALLOCated beforehand.
If your program specifies ACTGRP(*CALLER):
If the program is called from the default activation group, the
storage is not freed until end-of-job, unless specifically DEALLOCated;
otherwise, if activated in an ILE activation group, storage is
reclaimed when that activation group is reclaimed, unless DEALLOCated.
So, the lifetime of heap storage depends upon which heap it gets
Does that "make sense"?
Mark S. Waterbury
> PAPWORTH Paul wrote:
If my programme has performed a series of %ALLOC et %REALLOC and is the
boundary of a named activation group , ending my programme will remove
the activation group , but will it also reclaim the storage , in the
same way as %DEALLOC. ?
Thanks in advance