Re: Simple NSMutableDictionary problem
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