[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Dynamically allocate memory for variable
Source position: line 0
procedure New( |
var P: Pointer |
); |
var P: Pointer; |
Cons: TProcedure |
); |
New allocates a new instance of the type pointed to by P, and puts the address in P. If P is an object, then it is possible to specify the name of the constructor with which the instance will be created.
The newly allocated memory is not initialized in any way, and may contain garbage data. It must be cleared with a call to FillChar or FillWord.
For an example, see Dispose.
If not enough memory is available, Nil will be returned.
|
Free dynamically allocated memory |
|
|
Release allocated memory |
|
|
Allocate new memory on the heap |