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



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

TObject.newinstance

Allocate memory on the heap for a new instance

Declaration

Source position: objpash.inc line 150

public function TObject.newinstance: TObject; virtual;

Description

NewInstance allocates memory on the heap for a new instance of the current class. If the memory was allocated, the class will be initialized by a call to InitInstance. The function returns the newly initialized instance.

Errors

If not enough memory is available, a Nil pointer may be returned, or an exception may be raised.

See also

Create

  

TObject Constructor

InitInstance

  

Initialize a new class instance.

InstanceSize

  

Return the size of an instance.

FreeInstance

  

Clean up instance and free the memory reserved for the instance.

Notes

 No notes exist for this page yet. 





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