RAD Studio VCL Reference
TList.Delete Method

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

procedure Delete(Index: Integer);
__fastcall Delete(int Index);

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

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 (Delphi) or NULL (C++).

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.


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!