dynamic array creation

Jarrett Billingsley kb3ctd2 at yahoo.com
Wed May 9 16:17:51 PDT 2007


"Myron Alexander" <someone at somewhere.com> wrote in message 
news:f1t63d$s5f$1 at digitalmars.com...
>
> Am I right if I say that the two forms of dynamic array creation are 
> effectively the same?

They will give you exactly the same result, though the

T[] arr = new T[n];

form will be slightly faster, only because it doesn't have to check to see 
what the current length of the array is when it resizes it. 




More information about the Digitalmars-d-learn mailing list