It's the autorelease
; you need to remove it, but more importantly (thanks @Yaman/@rmaddy) you aren't assigning the allocated object to _sharedInstance
.
What will happen is that the next time the run loop ends, or the next time the autorelease pool is destroyed, whichever is sooner, the instance will be released. The _sharedInstance
pointer will be left dangling and the next user of the object will fault with message sent to deallocated instance (or some such).