If you create a structured LinkedList or Map (Either standalone, or part of a structure) do they automatically get released (memory freed) upon program end, or they lose scope (defined in a procedure)?
Just want to be sure,
Thanks
Code: Select all
Structure Struct
*Memory.Character
EndStructure
Procedure Test()
NewList L.Struct()
AddElement(L())
L()\Memory = AllocateMemory(1000)
AddElement(L())
L()\Memory = AllocateMemory(555)
AddElement(L())
L()\Memory = AllocateMemory(789)
; Free allocated memory
ForEach L()
FreeMemory(L()\Memory)
Next
; List elements are deleted automatically
EndProcedure