help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'System' (#rtl)

New

Dynamically allocate memory for variable

Declaration

Source position: line 0

procedure New(

  var P: Pointer

);

procedure New(

  var P: Pointer;

  Cons: TProcedure

);

Description

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.

For an example, see Dispose.

Errors

If not enough memory is available, Nil will be returned.

See also

Dispose

  

Free dynamically allocated memory

Freemem

  

Release allocated memory

Getmem

  

Allocate new memory on the heap

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505