• 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: Simple NSMutableDictionary problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple NSMutableDictionary problem


  • Subject: Re: Simple NSMutableDictionary problem
  • From: Andy Lee <email@hidden>
  • Date: Tue, 12 Aug 2008 17:37:30 -0400

On Aug 12, 2008, at 5:12 PM, Matt Keyes wrote:
Also, how do I define a non-mutable dictionary of a particular size? There is no dictionaryWithCapacity function that I can find in the non-mutable version. All the examples I can find are not practical (i.e. hardcoding a dictionary at its creation with random values like @"One", @"Two", etc.).

When you create an immutable dictionary, it contains everything it's ever going to contain, since you can't change its contents. It doesn't make sense to define an immutable dictionary of arbitrary size, since you wouldn't be able to use the empty slots for anything.


--Andy


_______________________________________________

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: 
 >Simple NSMutableDictionary problem (From: Matt Keyes <email@hidden>)

  • Prev by Date: [MEET] BYU CocoaHeads August 14th @ 7pm
  • Next by Date: Re: What's the use of the Z_UUID in the Z_METADATA table?
  • Previous by thread: Re: Simple NSMutableDictionary problem
  • Next by thread: Re: Simple NSMutableDictionary problem
  • Index(es):
    • Date
    • Thread