Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> dispose remove variable from heap space pp 124</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DISPOSE                Remove Variable from Heap Space               pp 124

 Syntax:  Dispose (PtrVar) ;

 Type:    Pointer

 Form:    Procedure

 Purpose: Dispose allows dynamic memory used by a specific point variable
          to be reclaimed for new use.  This is opposed to Mark/Release
          which releases the entire heap from the specified pointer variable
          and upward.

 Notes:   Dispose and Mark/Release must NOT be used in the same program.
          Use of dispose can create free areas of heap space interspersed
          with allocated areas.  Subsequent calls to NEW will reuse these
          areas if the new pointer fits in the free space.



 Usage:
       VAR
          PtrVar : ^Integer ;

       BEGIN
          Dispose (PtrVar)  ;
       END.

See Also: FreeMem GetMem Mark New Release

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson