标签:
1 #import "DispatchOnecManager.h" 2 3 @implementation DispatchOnecManager 4 + (id)defaultManager 5 { 6 static DispatchOnecManager *manager = nil; 7 //onceToken是用来标志下面的任务是否为第一次分发 8 static dispatch_once_t onceToken; 9 dispatch_once(&onceToken, ^{manager = [[self alloc] init];}); 10 return manager; 11 12 } 13 @end
标签:
原文地址:http://www.cnblogs.com/songshuhaoNB/p/4589406.html