Sign in Join
FPDoc Onlineexperiment

TObject.Free procedure

Member of TObjectpublicIn unit System

Check for Nil and call destructor.

Declaration

pascal
procedure Free

Description

Free will check the Self pointer and calls Destroy if it is different from Nil. This is a safer method than calling Destroy directly. If a reference to the object must be reset as well (a recommended technique), then the function FreeAndNil should be called.

Errors

None.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.