• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: remove elements during the iteration on NSMutableDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: remove elements during the iteration on NSMutableDictionary
      • From: "Michael Ash" <email@hidden>
References: 
 >remove elements during the iteration on NSMutableDictionary (From: "Wayne Shao" <email@hidden>)
 >Re: remove elements during the iteration on NSMutableDictionary (From: Negm-Awad Amin <email@hidden>)
 >Re: remove elements during the iteration on NSMutableDictionary (From: "Wayne Shao" <email@hidden>)
 >Re: remove elements during the iteration on NSMutableDictionary (From: Negm-Awad Amin <email@hidden>)
 >Re: remove elements during the iteration on NSMutableDictionary (From: Roland King <email@hidden>)
 >Re: remove elements during the iteration on NSMutableDictionary (From: Andrew Merenbach <email@hidden>)
 >Re: remove elements during the iteration on NSMutableDictionary (From: Negm-Awad Amin <email@hidden>)
 >Re: remove elements during the iteration on NSMutableDictionary (From: Andrew Merenbach <email@hidden>)

  • Prev by Date: Re: post events to NSApplication
  • Next by Date: Re: handling idle events
  • Previous by thread: Re: remove elements during the iteration on NSMutableDictionary
  • Next by thread: Re: remove elements during the iteration on NSMutableDictionary
  • Index(es):
    • Date
    • Thread