The HEAP_GC procedure performs garbage collection on heap variables. It searches all current IDL variables (including common blocks, widget user values, etc.) for pointers and object references and determines which heap variables have become inaccessible. Pointer heap variables are freed (via PTR_FREE) and all memory used by the heap variable is released. Object heap variables are destroyed (via OBJ_DESTROY), also freeing all used memory.
The default action is to perform garbage collection on all heap variables regardless of type. Use the POINTER and OBJECT keywords to remove only specific types.
| Note |
| Warning |
HEAP_GC [, /OBJ | , /PTR] [, /VERBOSE]
None.
Set this keyword to perform garbage collection on object heap variables only.
Set this keyword to perform garbage collection on pointer heap variables only.
| Note |
If this keyword is set, HEAP_GC writes a one line description of each heap variable, in the format used by the HELP procedure, as the variable is destroyed. This is a debugging aid that can be used by program developers to check for heap variable leaks that need to be located and eliminated.
Introduced: 5.0