I’m trying to work out the pros and cons of @"" and [NSString string] as they appear to behave in a similar fashion. I guess I’m hoping [NSString string] returns a static value thus avoiding unnecessary string creation in memory. Can anyone shed some light as the documentation is inconclusive.
I’m trying to work out the pros and cons of @ and [NSString string]
Share
It’s quite probable that
@"" == [NSString string]and therefore the decision is just a matter of style. Aha, it’s not:But I can’t think of any use case where the difference would matter.