Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +(Server*)sharedInstance{
- while (!sharedInstance) {
- Server* temp = [[self alloc] init];
- if(!temp) break;
- if(!OSAtomicCompareAndSwapPtrBarrier(0x00, temp, &sharedInstance)){
- [temp release];
- }
- }
- return sharedInstance;
- }
Add Comment
Please, Sign In to add comment