views:

41

answers:

1

Can anyone confirm this for me ...

NSString *testString = @"Betty";

By my way of thinking this line is declaring the NSString pointer (*testString) to point to the string literal @"Betty". This declaration does not need an alloc, nor does it need to be released? I just want to make sure I am on the right track.

-gary-

+1  A: 

You are on the right track. The string literal will be compiled to a immutable instance of NSString.

See this question for more details.

pgb
Perfect, thank you ...
fuzzygoat