Sign in Join
FPDoc Onlineexperiment

TObjectList.Remove function

Member of TObjectListpublicIn unit Contnrs

Remove (and possibly free) an element from the list.

Declaration

pascal
function Remove(AObject: TObject): Integer

Arguments

AObject

Object to remove from the list.

Function result

Index of the removed object, or -1 if none was removed.

Description

Remove removes Item from the list, if it is present in the list. It frees Item if OwnsObjects is True, and returns the index of the object that was found in the list, or -1 if the object was not found.

Note that only the first found object is removed from the list.

Errors

None.

See also

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