Sign in Join
FPDoc Onlineexperiment

TStrings.SetCapacity procedure

Member of TStringsprotectedIn unit Classes

Write handler for the Capacity property.

Declaration

pascal
procedure SetCapacity(NewCapacity: Integer); virtual

Description

SetCapacity is the write handler for the Capacity property. The TStrings implementation of SetCapacity does nothing.

Descendant classes can override this method to set the current capacity of the stringlist to NewCapacity. The capacity is the number of strings the list can hold before it tries to expand its storage space. NewCapacity should be no less than Count.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.