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



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

TObject.Free

Destroy an object and release all memory.

Declaration

Source position: objects.pp line 252

procedure TObject.Free;

Description

Free calls the destructor of the object, and releases the memory occupied by the instance of the object.

Errors

No checking is performed to see whether self is nil and whether the object is indeed allocated on the heap.

See also

TObject.Init

  

Construct (initialize) a new object

TObject.Done

  

Destroy an object.

Example

program ex7;

{ Program to demonstrate the TObject.Free call }

Uses Objects;

Var O : PObject;

begin
  // Allocate memory for object.
  O:=New(PObject,Init);
  // Free memory of object.
  O^.free;
end.

Notes

 No notes exist for this page yet. 





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