RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TComponentList Class

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

Pascal
TComponentList = class(TObjectList);
C++
class TComponentList : public TObjectList;

Contnrs

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. 

 

Working with Lists

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!