cobolFREE statement

Remarks

The FREE statement frees allocated memory for one or more identifiers, either by POINTER or from a BASED working storage identifier. Use after FREE is illegal.

enter image description here

FREE an allocation

01 field-1 PIC X(80) BASED.

ALLOCATE field-1

*> use field-1

FREE field-1

*> further use of field-1 will cause memory corruption