Memory leak with dynamic array

bearophile bearophileHUGS at lycos.com
Sun Apr 11 18:31:24 PDT 2010


Ellery Newcomer:
> OTish: It would be nice if the data-structures-to-be are designed such 
> that they can be easily dropped in wherever dynamic arrays are used. At 
> least the list-like ones.

Andrei will probably do what you are asking for here.

But those list-like data structures probably can't be defined using the normal array literals :-) D2 operator overloading is flexible enough for many purposes, but data structure literals are a weak spot of D. For example you need to put the digits in a string to initialize a large BigInt. It's not easy to invent a way to allow literal design through code in a C-like language.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list