[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Besides the standard `New' and `Dispose' routines, GPC
also allows BP style dynamic memory management with GetMem
and FreeMem
:
GetMem (MyPtr, 1024); FreeMem (MyPtr, 1024); |
GPC also supports function style call to GetMem
:
MyPtr := GetMem (1024); |
(see also: New
in context of Object Orientated Programming)
One somehow strange feature of Borland is not supported:
You cannot free parts of a variable with FreeMem
, while the
rest is still used and can be freed later by another FreeMem
call:
program PartialFreeMemDemo; |