Skip to main content

TdxFastList.Expand Method

Expands the ordered pointer list’s capacity by a predefined amount.

Declaration

function Expand: TdxFastList;

Returns

Type
TdxFastList

Remarks

Call this function to increase the list’s capacity by a predefined amount that depends on the current capacity, provided that free space is already used up (that is, the Count and Capacity property values are equal). The Expand function returns:

  • An updated reference to the ordered pointer list in Delphi code.

  • A pointer to the beginning of the reallocated continuous memory block that the expanded ordered pointer list occupies (in C++Builder code).

Note

An Expand function call has no effect if the list stores fewer pointers than it can currently contain. The function returns an unchanged reference (in Delphi code) or pointer (in C++Builder) in this case.

All methods that add new pointers to the list (that is, Add, AddRange, Insert, and InsertRange) internally expand it if the resulting number of stored items exceeds the current Capacity property value.

See Also