Quick int pointer allocation question

Chris Cain clcain at uncg.edu
Fri Sep 14 11:27:50 PDT 2012


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


More information about the Digitalmars-d-learn mailing list