Show: Delphi C++
Display Preferences

Dynamic Memory Allocation Routines

From RAD Studio
Jump to: navigation, search

Go Up to API Categories Index

This topic lists all dynamic memory management routines. These functions are platform independent.

Routine Description Type

System.AllocMem

System.AllocMem allocates a memory block and initializes each byte to zero.

Standard function.

System.Dispose

Releases memory allocated for a dynamic variable.

Compiler Built-in. System._Dispose or System._FreeMem is called.

System.Finalize

Uninitializes a dynamically allocated variable.

Compiler Built-in.

System.FreeMem

System.FreeMem frees a memory block.

Compiler Built-in. System._FreeMem is called.

System.FreeMemory

System.FreeMemory frees a memory block.

Standard function.

System.GetMem

System.GetMem allocates a memory block.

Compiler Built-in. System._GetMem is called.

System.GetMemory

System.GetMemory allocates a memory block.

Standard function.

System.Initialize

System.Initializes a dynamically allocated variable.

Compiler Built-in. System._Initialize, System._InitializeArray or System._InitializeRecord is called.

System.New

Creates a new dynamic variable and sets P to point to it.

Compiler Built-in. System._GetMem or System_New is called.

System.ReallocMem

System.ReallocMem reallocates a memory block.

Compiler Built-in. System._ReallocMem is called.

System.ReallocMemory

System.ReallocMemory resizes a memory block.

Standard function.

FreeMem procedure

procedure FreeMem(var P: Pointer; [ Size: Integer]);

This procedure is a Delphi-built-in function, not defined in System.pas. The procedure has two overloaded forms:

procedure FreeMem(var P: Pointer); overload; procedure FreeMem(var P: Pointer; Size: NativeInt); overload;

Delphi compiler still allows using second form with Size parameter, but the current RTL doesn't use Size parameter to validate memory block.

See Also

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance