Array.reserve

Preallocate memory without resizing.

struct Array(T, size_t chunkSize = 32)
void
reserve
(
const(size_t) amount
)

Examples

Array!int arr;
arr.reserve(100);
assert(arr.length == 0);
assert(arr.dynamicStorage.length == 100);

Meta