System.Contnrs.TObjectList

From RAD Studio API Documentation
Jump to: navigation, search

System.Classes.TListSystem.TObjectTObjectList

Delphi

TObjectList = class(TList)

C++

class PASCALIMPLEMENTATION TObjectList : public System::Classes::TList

Properties

Type Visibility Source Unit Parent
class public
System.Contnrs.pas
System.Contnrs.hpp
System.Contnrs System.Contnrs

Description

TObjectList maintains a list of (owned) objects.

Use TObjectList to store and maintain a list of objects. TObjectList provides properties and methods to add, delete, rearrange, locate, access, and sort objects. If the OwnsObjects property is set to true (the default), TObjectList controls the memory of its objects, freeing an object when its index is reassigned; when it is removed from the list with the Delete, Remove, or Clear method; or when the TObjectList instance is itself destroyed.

Note: It is recommended to use System.Generics.Collections.TObjectList, which is the generic version of this class, as it offers a more modern coding style.

See Also