System.Classes.TList.Pack
Delphi
procedure Pack;
C++
void __fastcall Pack();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Classes.pas System.Classes.hpp |
System.Classes | TList |
Description
Deletes all nil (Delphi) or NULL (C++) items from the Items array.
Call Pack to move all non-nil (Delphi) or non-NULL (C++) items to the front of the Items array and reduce the Count property to the number of items actually used. Pack does not free up the memory used to store the nil (Delphi) or NULL (C++) pointers. To free up the memory for the unused entries removed by Pack, set the Capacity property to the new value of Count.
See Also
Code Examples