static Singleton* _instance = nil;
+ (Singleton *)shareSingleton{
static dispatch_once_t once;
dispatch_once(&once, ^{
_instance = [[super allocWithZone:nil] init];
});
return _instance;
}
+ (instancetype)alloc{
return [self shareSingleton];
}
static Singleton* _instance = nil;
+ (Singleton *)shareSingleton{
static dispatch_once_t once;
dispatch_once(&once, ^{
_instance = [[super allocWithZone:nil] init];
});
return _instance;
}
+ (instancetype)alloc{
return [self shareSingleton];
}
219
5477

被折叠的 条评论
为什么被折叠?