DisposeMem procedure
Dispose of a heap memory block and
Nil the pointer (deprecated).
Declaration
procedure DisposeMem(var Buffer; Size: Integer)Arguments
Buffer | Pointer to memory area. |
Size | Size of the memory block. |
Description
DisposeMem disposes of the heap memory area pointed to by
Buffer (
Buffer must be of type
Pointer).
The
Size parameter
indicates the size of the memory area (it is, in fact, ignored by the heap manager). The pointer
Buffer is set
to
Nil. If
Buffer is
Nil, then nothing happens. Do not use
DisposeMem on objects,
because their destructor will not be called.Errors
If
Buffer is not pointing to a valid heap memory block, then memory corruption may occur.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
