Re: Difference between SEL and const char* when sending a message?
Re: Difference between SEL and const char* when sending a message?
- Subject: Re: Difference between SEL and const char* when sending a message?
- From: Marcel Weiher <email@hidden>
- Date: Wed, 8 Apr 2009 07:33:02 -0700
On Apr 8, 2009, at 7:27 , Michael Ash wrote:
The runtime relies on this property for all kinds of things. By
passing in a naked C string, you're bypassing the uniquing mechanism,
and could easily end up with a string which has the same *contents*
but is not at the same address. This could break all sorts of things
s/could/will/g
"All sorts of things" specifically includes objc_msgSend(), which only
uses the address, not whatever is located at the address...
Marcel
_______________________________________________
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