Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Collection was mutated while being enumerated



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.