Skip to content

TFPObjectList.Delete

Delete an element from the list.

Declaration

Source position: contnrs.pp line 56

public 
procedure TFPObjectList.Delete(Index: Integer);

Description

Delete removes the object at index Index from the list. When OwnsObjects is True, the object is also freed.

Errors

An access violation may occur when OwnsObjects is True and either the object was freed externally, or when the same object is in the same list twice.

See also

Name Description
TFPObjectList.Remove Remove an item from the list.
TFPObjectList.Extract Extract an object from the list.
TFPObjectList.OwnsObjects Should the list free elements when they are removed.
TFPObjectList.Add Add an object to the list.
TFPObjectList.Clear Clear all elements in the list.