Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

ensure_capacity

container.expanding_array.ensure_capacity

make sure this `expanding_array` has capacity of at least
`new_capacity` and we are able to add elements without
allocating a new internal array.

This will create an `expanding_array` whose internal array
is the same of `expanding_array.this` unless the existing
capacity is less than `new_capacity` or the existing array
was already expanded using by a call to `add`.

In the latter cases, a new internal array of required capacity
will be allocated and the existing elements will be copied over.
0.095dev (2025-08-15 12:02:22 GIT hash 301b5b75e77076d091b38f555473f9f0e31e5b5c built by fridi@fzen)