• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Difference between SEL and const char* when sending a message?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Difference between SEL and const char* when sending a message? (From: Daqi Pei <email@hidden>)
 >Re: Difference between SEL and const char* when sending a message? (From: Michael Ash <email@hidden>)

  • Prev by Date: NSURLConnection crashes with EXC_BAD_ADDRESS -- can't find why...
  • Next by Date: Re: Beachball on Lengthy Task
  • Previous by thread: Re: Difference between SEL and const char* when sending a message?
  • Next by thread: Re: Difference between SEL and const char* when sending a message?
  • Index(es):
    • Date
    • Thread