Sign in Join
FPDoc Onlineexperiment

ReleaseRefAndNil procedure

In unit LazClasses

Releases the specified reference counted object and sets it to Nil.

Declaration

pascal
procedure ReleaseRefAndNil(var ARefCountedObject)

Arguments

ARefCountedObject

TRefCountedObject object instance examined and updated in the routine.

Description

No actions are performed in the method when ARefCountedObject has not been assigned, or has already been released. ReleaseRefAndNil calls the ReleaseReference method for the object instance, and sets the pointer in ARefCountedObject to Nil.

Errors

Raises an EAssertionFailed exception if the object instance in ARefCountedObject is derived from a class other than TRefCountedObject.

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