Re: Hash Values in Custom Classes
Re: Hash Values in Custom Classes
- Subject: Re: Hash Values in Custom Classes
- From: Mike Abdullah <email@hidden>
- Date: Sat, 26 Mar 2011 00:22:03 +0000
It sounds like you're rather misunderstanding what -hash does. Cocoa classes are free to cover the full range of possible hash values.
You can't have a value that "interferes" with the framework; at worse you could reduce performance IF putting custom objects in the same container as framework-provided classes. Even then you'd be hard-pressed to do this regularly.
On 26 Mar 2011, at 00:04, Peter Lübke wrote:
> Hi,
>
> I'm wondering if there exists a listing of the hash values used by the various Cocoa / CoreFoundation classes.
> I override -isEqual in my custom classes and want to make sure I don't assign hash values that interfere with the framework(s).
>
> Thanks,
>
> Peter
> _______________________________________________
>
> 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