System.Classes.TStringList.SetCapacity
Delphi
procedure SetCapacity(NewCapacity: Integer); override;
C++
virtual void __fastcall SetCapacity(int NewCapacity);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | System.Classes.pas System.Classes.hpp |
System.Classes | TStringList |
Description
Changes the amount of memory allocated to hold strings in the list.
SetCapacity changes the number of strings that the list can hold.
Note: Assigning a value smaller than Count removes strings from the end of the list. Assigning a value greater than Count allocates space for more strings to be added.