System.Contnrs.TComponentList

From RAD Studio API Documentation
Jump to: navigation, search

System.Contnrs.TObjectListSystem.Classes.TListSystem.TObjectTComponentList

Delphi

TComponentList = class(TObjectList)

C++

class PASCALIMPLEMENTATION TComponentList : public TObjectList

Properties

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

Description

TComponentList maintains a list of components, updating itself when a component is freed.

Use TComponentList to store and maintain a list of components. TComponentList provides properties and methods to add, delete, rearrange, locate, access, and sort components. Like TObjectList, TComponentList controls the memory of its components; unless the OwnsObjects property is set to false (or the components are removed with the Extract method). TComponentList frees its components when they are removed from the list or when the TComponentList instance is itself destroyed.

In addition, TComponentList tracks its components. When a component is freed, TComponentList automatically updates itself by deleting the reference to the freed component and packing the list.

See Also