I don't quite understand static variables when defined in the implementation of an interface. In methods I do understand how they differ from local variables, but not when defined directly in an implementation.
Look at these examples. What difference do these two make practically?
#include "MyClass.h"
@implementation MyClass
int myInt;
...
@end
And:
#include "MyClass.h"
@implementation MyClass
static int myInt;
...
@end
myInt is in both cases visible to all the methods, and if I interpreted a test I ran correctly, myInt will in both cases be the same variable for different instances of the class.