Reserve Array

 
 
 

Categories

  • Array

Description

Manually reserves memory internally to store an array that will eventually grow to the specified size. Reserve does not resize the array.

The main reason for using Reserve is efficiency. If you know the size the array will eventually grow to in advance, reserving the space in memory ahead can help improve performance when increasing the array size frequently.

Ports

Inputs

Size

The number of array cells to reserve. This is typically the maximum size you know the array will grow to.

Array

The array to reserve memory for.

Outputs

Result

The input array but with reserved memory.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License