ObjectiveC:Synchronized How to use What is @synchronized directive in Objective C? +(id)getSingletonInstance { @synchronized(self) { if (singletonObj == nil) { singletonObj = [[self alloc] init]; } return singletonObj; } } See also Objective-C