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

TObject.Free

Check for Niland call destructor.

Declaration

Source position: objpash.inc line 130

public procedure TObject.Free;

Description

Freewill check the Selfpointer and calls Destroyif it is different from Nil. This is a safer method than calling Destroydirectly. If a reference to the object must be reset as well (a recommended technque), then the function FreeAndNilshould be called.

Errors

None.

See also

Destroy

  

TObjectdestructor.

FreeAndNil

  

Free object if needed, and set object reference to Nil