title: What are the memory implications of the sharedInstance pattern under ARC?
body: <p>I'm using the common singleton pattern as follows:</p>
  
  <pre><code>+ (SomeClass *)sharedInstance {
      static SomeClass *__sharedInstance;
      static dispatch_once_t onceToken;
      dispatch_once(&amp;onceToken, ^{
          __sharedInstance = [[SomeClass alloc] init];
      });
  
      return __sharedInstance;
  }
  </code></pre>
  
  <p>I understand that the SomeClass object gets instantiated the first time I call [SomeClass sharedInstance], however, <strong>when does SomeClass get dealloc'd?</strong></p>
  
  <p>This is under ARC so when does the compiler release the SomeClass static object? Is it guaranteed to be around for the rest of the life of my app?</p>