FREE (delete all entries)

Top  Previous  Next

 

FREE( queue )

FREE

Deletes all entries from a QUEUE.

queue

The label of a QUEUE structure, or the label of a passed QUEUE parameter.

FREE deletes all entries from a QUEUE and de-allocates the memory they occupied. It also de-allocates the memory used by the QUEUE's "overhead." FREE does not clear the QUEUE's data buffer.

If the QUEUE contains any reference variables or fields with the ANY data type, you must first CLEAR each QUEUE entry before FREEing the QUEUE. This will avoid memory leaks by freeing up the memory used by the ANY variables before the FREE statement removes the pointer to the allocated memory.

Errors Posted:

08   Insufficient Memory

Example:

FREE(Location)     !Free the location queue

FREE(NameQue)      !Free the name queue

 

See Also:

ANY

CLEAR

Reference Variables