System.Classes.TStringList.SetCapacity

From RAD Studio API Documentation
Jump to: navigation, search

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.

See Also