An unfortunate "misfeature"

Jarrett Billingsley kb3ctd2 at yahoo.com
Thu Dec 27 17:13:01 PST 2007


"0ffh" <frank at frankhirsch.youknow.what.todo.net> wrote in message 
news:fl1hjm$kvu$1 at digitalmars.com...
> Hxal wrote:
>> Personally I'd be happy if array literals were allocated in the read-only 
>> data section
>> and on the stack (for dynamic initializers). There's always the [1, 2, 
>> 3].dup syntax for
>> allocating on the heap. But that kind of change might break a lot of 
>> existing code.
>
> Well, just in case you are interested, I was curious and patched
> Phobos to use a single preallocated buffer for array literals. =)
> It seems to work, and I suppose the same could be done for Tango.

Now use it in a multithreaded app ;)

Unless you've already synchronized it. 





More information about the Digitalmars-d mailing list