System.SysUtils.TMarshaller.ReallocMem
Delphi
function ReallocMem(OldPtr: TPtrWrapper; NewSize: NativeInt): TPtrWrapper;
C++
System::TPtrWrapper __fastcall ReallocMem(System::TPtrWrapper OldPtr, System::NativeInt NewSize);
Properties
| Type | Visibility | Source | Unit | Parent | 
|---|---|---|---|---|
| function | public | System.SysUtils.pas System.SysUtils.hpp | System.SysUtils | TMarshaller | 
Description
Allocates and returns a block of memory.
- If OldPtris nil, ReallocMem allocates a new block of memory of sizeNewSize.
- If NewSizeis 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.