TFPGObjectList.Remove
Remove an object from the list.
Declaration
Source position: fgl.pp line 200
public
function Remove(const Item: T) : Integer;
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, (TFPGObjectList.FreeObjects is set to True) then the object is freed.
Errors
None.
See also
Name | Description |
---|---|
TFPGObjectList.FreeObjects | Does the list own the objects or not? |
TFPGObjectList.IndexOf | Index of item |
TFPSList.Delete | Delete an item from the list |