I am having problem understanding part of the function of \"selectors\", as described in Apple\'s guide. I\'ve bolded the parts where I am getting confused:
Yes. Classes do share selectors.
I can give an example from the source code objc-sel.mm
, but when you use sel_registerUid()
(used behind the scenes in @selector()
),
It copies the input string into an internal buffer (if the string hasn't been registered before), for which all future SELs point to.
This is done for less memory usage, and easier message forwarding.