System.SysUtils.TMarshaller.ReallocMem
Delphi
function ReallocMem(OldPtr: TPtrWrapper; NewSize: NativeInt): TPtrWrapper;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas | System.SysUtils | TMarshaller |
Description
Allocates and returns a block of memory.
- If
OldPtr
is nil, ReallocMem allocates a new block of memory of sizeNewSize
. - If
NewSize
is 0, ReallocMem returns a nil wrapped pointer. - Otherwise, ReallocMem resizes the existing block, or allocates a new block and copies the old data to it and returns it.