0

Possible Duplicate:
What's the difference between a string constant and a string literal?

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-

Community
  • 1
  • 1
fuzzygoat
  • 26,573
  • 48
  • 165
  • 294

1 Answers1

1

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

See this question for more details.

Community
  • 1
  • 1
pgb
  • 24,813
  • 12
  • 83
  • 113