Memory allocation: Difference between revisions
added Arturo implementation
Deadmarshal (talk | contribs) m (→Heap: Fixed typo) |
Drkameleon (talk | contribs) (added Arturo implementation) |
||
Line 196:
% the memory allocated will now be garbage collected - there is no explicit de-allocation %
end.</syntaxhighlight>
=={{header|Arturo}}==
In Arturo, memory allocation is handled totally and exclusively by the VM, who is responsible for allocating and de-allocatiing memory when no longer needed, via the garbage collector.
The only way a programmer can "allocate" more memory is by flexible structures, like Blocks, and adding more elements to one of the pre-allocated structures.
<syntaxhighlight lang="arturo">
myBlock: @[1 2 3]
'myBlock ++ [4 5 6]
</syntaxhighlight>
=={{header|AutoHotkey}}==
|