Re: NSDictionary key types
Re: NSDictionary key types
- Subject: Re: NSDictionary key types
- From: Nick Zitzmann <email@hidden>
- Date: Thu, 6 Jan 2011 14:19:55 -0700
On Jan 6, 2011, at 2:17 PM, Jon Sigman wrote:
> Okay, I'm thoroughly confused now. What exactly is this hash value? The documentation just says its "an integer that can be used as a table address in a hash table structure." That doesn't mean much to me.
>
> Do the following two objects have the same hash value, and if so, why do thay? How is it assigned?
> id myStr1 = @"8760";
> id myStr2 = @"8760";
Yes, they do. Hashes are generated by the accessor, not assigned, and they are based on the contents of the object.
Nick Zitzmann
<http://www.chronosnet.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