From Appmethod Libraries
Jump to: navigation, search


Object Pascal

TComponentList = class(TObjectList)


class PASCALIMPLEMENTATION TComponentList : public TObjectList


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


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