title: What's the meaning of static variables in an implementation of an interface?
body: <p>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.</p>
  
  <p>Look at these examples. What difference do these two make practically?</p>
  
  <pre><code>#include "MyClass.h"
  
  @implementation MyClass
  int myInt;
  ...
  @end
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>#include "MyClass.h"
  
  @implementation MyClass
  static int myInt;
  ...
  @end
  </code></pre>
  
  <p><code>myInt</code> is in both cases visible to all the methods, and if I interpreted a test I ran correctly, <code>myInt</code> will in both cases be the same variable for different instances of the class.</p>