Objective-C singleton implementation Is this the right way to do a singleton in Objective-C (coming from an Android background, with a little understanding of threading)?

#import "ItemsManager.h"

#define kNumMaxSelectableItems 15

@implementation ItemsManager{
    NSMutableArray *currentItems;
}

static ItemsManager *myself;

-(id)init{
    if(self=[super init]){
        currentItems = [[NSMutableArray alloc] initWithCapacity:kNumMaxSelectableItems];
        myself = self;
    }
    return self;
}

+(ItemsManager *)getInstance{
    if(!myself){
        myself = [[ItemsManager alloc] init];
    }
    return myself;
}

-(void) doSomething{
    NSLog(@"hi");
}

-(void)dealloc{
    [currentItems release];
    currentItems = nil;
    myself = nil;

    [super dealloc];
}

@end


And with this design, I suppose I would call it like:

void main(){
    [[ItemsManager getInstance] doSomething];
}
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;
}