FREEMEM

Top  Previous  Next

Syntax

FREEMEM(mem as MEMORY)

Description

Frees memory previously allocated with the ALLOCMEM statement.

Parameters

mem - A variable of type MEMORY used as a placeholder to access the allocated memory

Return value

None

Remarks

Once the memory is freed it is returned to the system and cannot be accessed again.

See Also: ALLOCMEM

Example usage

DEF mymem as MEMORY
IF ALLOCMEM(mymem,100,10)
    PRINT "Allocated 1000 bytes of memory"
    FREEMEM mymem
ENDIF