System.Classes.TList.Delete

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Delete(Index: Integer);

C++

void __fastcall Delete(int Index);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Classes.pas
System.Classes.hpp
System.Classes TList

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.

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. The object can be freed by overriding the Notify method.

See Also