Task

Show how to explicitly allocate and deallocate blocks of memory in your language.

Show access to different types of memory (i.e., heap, stack, shared, foreign) if applicable.




-- Create a ByteArray of 100 Kb (pre-filled with 0 bytes)
ba = byteArray(102400)
 
-- Lingo uses garbage-collection, so allocated memory is released when no more references exist. 
-- For the above variable ba, this can be achieved by calling: 
ba = VOID