Re: When do I need to override hash?
Re: When do I need to override hash?
- Subject: Re: When do I need to override hash?
- From: Kirk Kerekes <email@hidden>
- Date: Fri, 21 Aug 2009 08:40:02 -0500
AFAIK, NSDictionary specifies that it COPIES keys, and RETAINS
objects. Thus even if you were to use an NSMutableString as a key, you
could not mutate the key in the NSDictionary. So the only way you are
likely to get into trouble with keys is if you do troublesome things
like use oddball mutable-only object types (or immutable collections
with mutable content objects, or objects with mutable properties) as
dictionary _keys_.
So don't do that.
_______________________________________________
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