On 27 Mar '08, at 7:59 PM, Kyle Sluder wrote:
On Thu, Mar 27, 2008 at 10:55 PM, Jeff Laing <[EMAIL PROTECTED] > wrote:What confuses me is that people keep talking about @"constant" as thoughit were a 'string constant' Its not, it's an Objective-C object that you can send messages to. [snip] What is the subtlety here that I must be missing?@"" strings are actually instances of an immutable private NSString subclass. I think it's called _NSConstantString or some such.
Yup. And they're not allocated on the heap; they're stored in the executable itself, although their memory layout is that of a "real" Obj-C object. The compiler tags them in such a way that the linker will coalesce identical ones into a single value.
Of course this is an implementation detail.
Yup. Don't rely on this behavior. —Jens
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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]