System.SysUtils.TMarshaller.ReallocMem

From RAD Studio API Documentation
Jump to: navigation, search

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 OldPtr is nil, ReallocMem allocates a new block of memory of size NewSize.
  • 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.

See Also