Create uninitialized dynamic array

Igor Shirkalin mathsoft at inbox.ru
Thu Oct 5 21:14:20 UTC 2017


On Thursday, 5 October 2017 at 21:04:30 UTC, Adam D. Ruppe wrote:
> On Thursday, 5 October 2017 at 19:59:48 UTC, Igor Shirkalin 
> wrote:
>> Is there a pure way to make what I want?
>
> oh i almost forgot about this function too:
>
> http://dpldocs.info/experimental-docs/std.array.uninitializedArray.1.html
>
>
> import std.array;
> double[] arr = uninitializedArray!(double[])(100);

Ha! I saw it some day and forgot too!

And GC.malloc is, I think, what I need.

Thank you!


More information about the Digitalmars-d-learn mailing list