new array without auto-initialization
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Thu Sep 26 14:23:10 PDT 2013
Hello all,
Suppose I create a new dynamic array:
auto arr = new int[10];
If I recall right, the values inside arr will be auto-initialized to int.init
(which is 0).
Again, if I recall right, there's a simple way to increase performance by not
auto-initializing the values, but I can't remember what it is.
Yes, I could use uninitializedArray/minimallyInitializedArray, but I seem to
recall there's another way that follows the above syntax (or am I misremembering
and just thinking of declared values?).
Thanks & best wishes,
-- Joe
More information about the Digitalmars-d-learn
mailing list