Staticity only changes the scope of the variable, not how it is declared or stored.
In both cases, the compiler will create a permanent version of the NSString instance, which is stored in the mach-o file. Thus, there is only one instance (note that you can change the behavior to force the dynamics to be dynamically created when mach-o loads, but there is one more instance).
static simply marks the aVar variable as visible within the compilation area - only the file. Without static you can update the string as extern NSString *aVar; in the header somewhere and access it from anywhere.
const is orthogonal and, in the case of an NSString reference, is almost completely irrelevant.
bbum Nov 28 '09 at 0:00 2009-11-28 00:00
source share