Sign in Join
FPDoc Onlineexperiment

TFPGObjectList.Remove function

Member of TFPGObjectListpublicIn unit fgl

Remove an object from the list.

Declaration

pascal
function Remove(const Item: T): Integer

Arguments

Item

Object to remove from the list.

Function result

Index of removed object, prior to removal.

Description

Remove removes the object Item from the list, and returns the index of the removed item. If no item was removed, -1 is returned. Only the first object is removed.

If the list owns the objects, (FreeObjects is set to True) then the object is freed.

Errors

None.

See also

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