Data.DBXPlatform.TDBXStringList.SetCapacity
Delphi
procedure SetCapacity(NewCapacity: Integer); override;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure | protected | System.Classes.pas | Data.DBXPlatform | TDBXStringList |
Description
Changes the amount of memory allocated to hold strings in the list.
Data.DBXPlatform.TDBXStringList.SetCapacity inherits from System.Classes.TStrings.SetCapacity. All content below this line refers to System.Classes.TStrings.SetCapacity.
Changes the amount of memory allocated to hold strings in the list.
SetCapacity is the protected write implementation of the Capacity property.
NewCapacity is the number of strings the list can hold after the capacity has changed.
In TStrings, the SetCapacity method does nothing. Descendent classes must override this method to change the number of strings that the list can hold.
Note: For descendent classes that implement SetCapacity, 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.