discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: difference between -[NSProxy hash] and -[NSObject hash]


From: Richard Frith-Macdonald
Subject: Re: difference between -[NSProxy hash] and -[NSObject hash]
Date: Mon, 20 Sep 2004 10:50:24 +0100


On 20 Sep 2004, at 10:30, andre levy wrote:

Hi all,

I found that:

-[NSProxy hash] returns (unsigned)self

and:

-[NSObject hash] returns (unsigned)self >> 3

Is there a reason why the two are not implemented the same way?

I mean, there seems to be a rationale behind the NSObject implementation, shouldn't it apply to NSPRoxy as well?
(and I do figure that other classes should be concerned too?)

NSProxy should do it the same way (for a slight performance increaese when storing proxies in sets/dictionaries)... other classes should not need to bother as they will inherit from NSObject.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]