[Overview][Types][Classes][Procedures and functions] Reference for unit 'contnrs' (#fcl)

TFPObjectList.Delete

Delete an element from the list.

Declaration

Source position: contnrs.pp line 48

public procedure TFPObjectList.Delete(

  Index: Integer

);

Arguments

Index

  

Index of the object to delete.

Description

Deleteremoves the object at index Indexfrom the list. When OwnsObjectsis True, the object is also freed.

Errors

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

See also

TTFPObjectList.Remove

TFPObjectList.Extract

  

Extract an object from the list

TFPObjectList.OwnsObjects

  

Should the list free elements when they are removed.

TTFPObjectList.Add

TTFPObjectList.Clear