Re: Collection was mutated while being enumerated
Re: Collection was mutated while being enumerated
- Subject: Re: Collection was mutated while being enumerated
- From: Milo Bird <email@hidden>
- Date: Fri, 2 Nov 2007 10:25:40 +0000
There were a number of performance improvements in Obj-C 2.0
One of them was loop optimization.
In order for this optimization to work, you can't change (mutate) a
collection while iterating through it with an enumerator.
I.E.: you can't add/delete items in an array or dictionary (change
the count) while looping through it - that's what the message below
is saying.
It's always been very dangerous to modify a collection while
enumerating it. It's just the logging that's new in Leopard.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden