realloc

Realloc the contents of an array

array = the array which will be resized numItems = the new size for the array init = whether to init the newly allocated items to their default values or not

version(Windows)
void
realloc
(
T
intT
)
(
ref T array
,,
bool init = true
)
out { assert (numItems == array.length); }

Examples

int[] foo;
foo.alloc(20);
foo.realloc(10);        // <--

Meta