Re: remove elements during the iteration on NSMutableDictionary
Re: remove elements during the iteration on NSMutableDictionary
- Subject: Re: remove elements during the iteration on NSMutableDictionary
- From: Andrew Merenbach <email@hidden>
- Date: Wed, 6 Aug 2008 15:08:36 -0700
On Aug 6, 2008, at 3:01 PM, mm w wrote:
i will return the question why fast enumerator prevents against this?
maybe in-memory Pile?, you should have answered to the question alone
Without knowing the workings of fast enumeration, I am at a loss as to
why it would prevent it -- unless it has something to do with the fast
enumerator not wanting to make an copy of the array before iterating,
a copy which might slow things down.
My apologies, but I don't know much about the Pile data structure
type, unfortunately, so I am unable to answer your other question.
Best,
Andrew
On Wed, Aug 6, 2008 at 2:56 PM, Andrew Merenbach
<email@hidden> wrote:
On Aug 6, 2008, at 10:36 AM, mm w wrote:
usually, in a better design view you do the opposite, a safe copy of
the keys that you need in a new dict, then you release the old man,
you have a really strange programming approach,
aDictionary -> aNewDictionary with only my wanted keys,
with your solution you ought to get some surprises
Hi! With all due respect, if you are referring to my own approach,
I was
attempting to answer the OPs actual question, which involved the
task of
removing selected items from an NSMutableDictionary. You have,
however,
piqued my curiosity immensely, and I am *not* being facetious when
I ask,
quite seriously: what sort of surprises?
Cheers,
Andrew
--
-mmw
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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