Skip to content

TFPSList.Capacity

Current capacity of the list

Declaration

Source position: fgl.pp line 93

public Property
  Capacity : Integer;

Description

Capacity is the current capacity (maximum amount of elements) of the list. The list capacity will expand automatically if an item is added and the capacity is reached (i.e. TFPSList.Count equals capacity. Expanding the list is an expensive operation involving reallocation of memory and moving of list data in memory, so capacity can be set to a large amount to avoid frequent reallocations.

See also

Name Description
Integer A signed 16-bits integer
TFPSList.Count Current element count
TFPSList.Expand Expand the capacity of the list
TFPSList.Items Items in the list