On Mar 27, 2008, at 4:20 PM, Nathan Vander Wilt wrote:
So does that mean once I'm up at the Cocoa level, that
constant strings *are* guaranteed to have the same
pointer if their contents are the same? What is
"unique" and what is a "module" in this context?

They might be unique, they might not. It might change over time or in context of usage. And it may change if you suddenly decide that one of those global constant strings really needs to be configurable at runtime.

Best not to rely upon it.

In general, -isEqual*: methods are optimized to check for pointer identity equality, if it is a significant optimization. Certainly, the cost of a msgSend() is greater than a pointer equality test, but likely not in any significant fashion.

Instruments or Shark can, of course, answer whether or not it matters.

b.bum

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to