Removing items from an Array
Mars
- at -.-
Fri Feb 17 02:35:03 PST 2012
On Friday, 17 February 2012 at 10:13:00 UTC, Jonathan M Davis
wrote:
> I don't believe that removing elements from an AA while
> iterating over it is safe.
>
> - Jonathan M Davis
Well, no. But from my experience it's okay from bottom to top...
at least in other languages.
What would be the alternative? Maybe build a new array while
iterating, and set it after the loop?
More information about the Digitalmars-d-learn
mailing list