Objective-C singleton implementation
This is the the way singletons are usually implemented in apple's code samples.

+ (ItemsManager *)sharedInstance
{
    static ItemsManager *sharedInstance = nil;
    static dispatch_once_t once;

    /* Doing the allocation inside dispatch_once queue ensures the code
       will run only once for the lifetime of the app. */

    dispatch_once(&amp;once, ^{
        sharedInstance = [[ItemsManager alloc] init];
    });

    return sharedInstance;
}