Arrays are sufficient for ArrayLists? Really??
Sean Kelly
sean at invisibleduck.org
Mon May 16 14:21:09 PDT 2011
On May 16, 2011, at 12:01 PM, Mehrdad wrote:
>
> Sean:
>> Removing and then appending one element to an array won't cause any allocations to occur.
>
> How is that possible, though? (See the example in my response to Timon.)
I wasn't thinking about how remove() worked. You'd have to adjust the length property of the original array before appending or it would think you were appending to a slice.
More information about the Digitalmars-d
mailing list