Unmanaged memory objects are blocks of RAM allocated from the heap or stack (using DIM or DIM ... LOCAL respectively) and represented by a raw pointer. Once allocated, the memory is typically accessed using indirection. For example:
Code: Select all
DIM mem%% 999
mem%%?456 = 123
Managed memory objects are strings, arrays and (in some versions) structures, allocated from the heap or stack and represented by a name. They are 'understood' by BASIC and accessed using a dedicated syntax for the relevant data type. For example:
Code: Select all
DIM mem&(999)
mem&(456) = 123
From my perspective, programs written today should never (or only in exceptional circumstances) use unmanaged memory, they should always use strings, arrays and structures in preference. This will result in programs that are more 'resilient' and less likely to need modification to run on a range of different platforms.