DRELEASE
NCHAR
The DRELEASE instruction detaches a DIM or NCHAR pointer variable from a DIM or NCHAR variable created by a DMAKE instruction. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
dest
Required. A previously defined DIM POINTER variable.
Flags Affected: none
Note the following:
If the {dest} pointer does not reference a DIM or NCHAR variable created by a DMAKE instruction, the pointer is simply cleared.
If the DIM or NCHAR variable in the DMAKE buffer allocation is not used by any DIM or NCHAR pointer variables after the DRELEASE operation, the DMAKE buffer allocation is freed. However, the DIM or NCHAR variable for the DMAKE buffer allocation is not freed if other program DIM or NCHAR pointers are referencing the buffer allocation after the DRELEASE operation is executed.
The instruction 'MOVEPTR 0,pDIM' detaches and clears a DIM pointer. If the pointer was referencing a DMAKE DIM variable, the action is the same as a DRELEASE instruction. Also, this same behavior is expected when a NCHAR variable is being used.
See Also: Example Code, Character String Instructions
![]() |