[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GetMem                   Allocates Memory for Dynamic Variables

 GetMem(var P : <pointer>; Amt : Integer);

    Allocates Amt bytes of memory on the heap and assigns P equal to a
    pointer to the bytes allocated. To deallocate this memory, you must
    call FreeMem with the same value for Amt. The contents of the memory
    allocated are not initialized to any particular value.

               P    A pointer to any data type.

             Amt    Number of bytes to be allocated.

  -------------------------------- Example ---------------------------------

           GetMem(P,SizeOf(P^));    { Allocate a block of memory }
                                    { to hold the data type }
                                    { pointed to by P. }

See Also: FreeMem New Dispose Mark Release
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson