Re: Status of @"" strings
Re: Status of @"" strings
- Subject: Re: Status of @"" strings
- From: Art Isbell <email@hidden>
- Date: Wed, 11 Jul 2001 21:56:29 -1000
On Wednesday, July 11, 2001, at 09:27 PM, Rob Rix wrote:
What is the status of strings in your code that have been
created using the @"" shorthand? It's shorthand for creating an
NSString instance, yes (I seem to recall reading that, and also
I seem to recall sample code somewhere that had an @"" string
as the receiver of a message)? Is it autoreleased?
These are uniqued string constants, probably similar to C
string constants (someone more familiar than I with string
constants please correct me). These string constants are
allocated in unmodifiable memory such that every reference to
the same string constant will refer to the same memory
location. So don't try to modify them - they're immutable.
Because they are string constants, they will not be freed
during the life of the process, so they needn't be retained or
released.
Art Isbell
Apple iServices Technical Support
http://www.apple.com/iservices/webobjectssupport/
+1-808-591-0836