Re: Collection was mutated while being enumerated
Re: Collection was mutated while being enumerated
- Subject: Re: Collection was mutated while being enumerated
- From: Tony Becker <email@hidden>
- Date: Mon, 29 Oct 2007 20:32:26 -0400
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.
On Oct 29, 2007, at 5:02 PM, Philip Dow wrote:
Since installing Leopard I'm seeing the following appear appear in
the console: "*** Collection <NSCFDictionary: 0x5e2e540> was
mutated while being enumerated."
I imagine this was something happening in the code before Leopard
but Leopard started logging it. Is there by any chance a breakpoint
I can set to catch where this is occurring? Would be handy.
-Phil
_______________________________________________
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
_______________________________________________
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