Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Introduction to External Program Interfaces : Using MEMPTR to reference external data : Initializing and uninitializing MEMPTR variables : Freeing memory associated with a MEMPTR variable
 
Freeing memory associated with a MEMPTR variable
The region of memory associated with a MEMPTR variable remains allocated until it is freed. ABL does not automatically free the memory for you. It is up to you to ensure that the memory is freed.
You can free the memory using SET-SIZE with an expression of zero (0). SET-SIZE then deallocates (frees) any memory region associated with mptr-name. This makes mptr-name uninitialized.
Note: You must fully understand the memory management provided by shared library routines before you can effectively using MEMPTR variables with them.