klyn.collections.ArrayListSync.reserve
method
public native reserve(capacity as Int) as Void
Description

Reserves internal storage for at least the requested number of elements. This avoids repeated reallocations when the final size is known in advance.

Parameters
ParameterDescription
capacityExpected minimum capacity.
Example
import klyn.collections

values = ArrayListSync<Int>()
values.reserve(1_000)