On Friday, 14 September 2012 at 18:14:54 UTC, bearophile wrote:
monarch_dodra:

I'm allocating an array of 500_000 ulongs, and afterwards, I'm initializing them all "by hand", making the default allocation useless.

In std.array there are two functions to avoid a double initialization, mostly to be used for nonreference data.

Bye,
bearophile

http://dlang.org/phobos/std_array.html#uninitializedArray

and

http://dlang.org/phobos/std_array.html#minimallyInitializedArray

Reply via email to