array construction without heap alloc

0ffh frank at frankhirsch.youknow.what.todo.net
Sat Dec 22 09:20:26 PST 2007


Frank Benoit wrote:
> I wonder why arrayliterals are allocated on the heap.
> You always have the .dup option.

That's really unfortunate, especially as the array does
quite definitely end up on the stack. So with a static
array and an array literal you would get the worst of
both worlds. I'll investigate that.

regards, frank


More information about the Digitalmars-d-learn mailing list