Re: Is @constantstring pointer equal to @constantstring aguarantee?

2008-03-28 Thread Chris Hanson
On Mar 27, 2008, at 8:39 PM, Jens Alfke wrote: @ 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

Re: Is @constantstring pointer equal to @constantstring aguarantee?

2008-03-28 Thread Ken Ferry
On Mar 28, 2008, at 2:36 AM, Chris Hanson [EMAIL PROTECTED] wrote: Yup. And they're not allocated on the heap; they're stored in the executable It's slightly more complicated than that -- there's also GCC's -fno-constant-cfstrings option, which will cause at least CFSTR() constants (I'm

Re: Is @constantstring pointer equal to @constantstring aguarantee?

2008-03-27 Thread Jens Alfke
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 though it were a 'string constant' Its not, it's an Objective-C object that you can send messages to. [snip]