• 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: proper way to release a static NSMutableDictionary?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proper way to release a static NSMutableDictionary?


  • Subject: Re: proper way to release a static NSMutableDictionary?
  • From: Dale Merrick <email@hidden>
  • Date: Wed, 17 Dec 2008 20:10:08 -0600

As someone else suggested why not just use

[lookup removeAllObjects]

or perhaps I am missing a part of the bigger picture for the project you're working on.

Dale Merrick


On Dec 15, 2008, at 4:54 PM, John Michael Zorko wrote:


Hello, all ...

Imagine this:

static NSMutableDictionary *lookup = [NSMutableDictionary new];

... now imagine a situation where I need to clear that dictionary. If I call

[lookup release];
lookup = [NSMutableDictionary new];

... it will obviously be faster than coding a for loop and removing each object in the dictionary, but since it was declared as static, which is safer?

Regards,

John

Falling You - exploring the beauty of voice and sound
http://www.fallingyou.com




_______________________________________________

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


References: 
 >proper way to release a static NSMutableDictionary? (From: John Michael Zorko <email@hidden>)

  • Prev by Date: subclassing NSApplication run
  • Next by Date: NSAppleScript returns wrong result on multiple Safari windows, applescript editor works
  • Previous by thread: Re: proper way to release a static NSMutableDictionary?
  • Next by thread: Core Data binary data optimization(s)
  • Index(es):
    • Date
    • Thread