Is there a way of creating and initialising a dynamic array ?

for example I am doing this:

auto arr = new float[<big number>];
arr[] = 0.0f;

Profiling indicates that the compiler (gdc) is spending significant time memsetting the whole array to something (nan ?) before I immediately memset it to 0.0f.

It would be good if there was a way of either void initialing it so that the first memset is avoided or a way of replacing the init value with a different one.


Reply via email to