API:System.WideStrings.TWideStringList.SetCapacity
Delphi
procedure SetCapacity(NewCapacity: Integer); override;
C++
virtual void __fastcall SetCapacity(int NewCapacity);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | System.WideStrings.pas System.WideStrings.hpp |
System.WideStrings | TWideStringList |
Description
Changes the amount of memory allocated to hold strings in the list.
System.WideStrings.TWideStringList.SetCapacity inherits from System.WideStrings.TWideStrings.SetCapacity. All content below this line refers to System.WideStrings.TWideStrings.SetCapacity.
Changes the amount of memory allocated to hold strings in the list.
SetCapacity is the protected read implementation of the Capacity property.
Integer is the number of strings the list can hold after the capacity has changed.
In TWideStrings, SetCapacity does nothing. Descendant classes override this method to change the number of strings that the list can hold. For descendant 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.