The OpenD Programming Language

RegionAllocator.newArray

Allocates an array of type T. T may be a multidimensional array. In this case sizes may be specified for any number of dimensions from 1 to the number in T.

struct RegionAllocator
newArray
(
T
I...
)
()

Examples

auto alloc = newRegionAllocator();
double[] arr = alloc.newArray!(double[])(100);
assert(arr.length == 100);

double[][] matrix = alloc.newArray!(double[][])(42, 31);
assert(matrix.length == 42);
assert(matrix[0].length == 31);

Meta