Google
TAbstractTypedList.Delete Method
Class
Pascal
procedure Delete(Index: Integer); virtual;
Description

Removes the item at the position given by the Index parameter. 

 

Call Delete to remove the item at a specific position from the list. The index is zero-based, so the first item has an Index value of 0, the second item has an Index value of 1, and so on. Calling Delete moves up all items in the Items array that follow the deleted item, and reduces the Count

 

In TList, the Extract and Delete methods behave exactly the same way. Descendant classes (including TObjectList and TComponentList) distinguish the two methods. 

 

To remove the reference to an item without deleting the entry from the Items array and changing the Count, set the Items property for Index to nil. 

 

Note: Delete does not free any memory associated with the item. To free the memory that was used to store a deleted item, set the Capacity property.

Related Information