为什么WXInvocationConfig这个抽象类会使用单例模式?
+ (instancetype)sharedInstance
{
static id _sharedInstance;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_sharedInstance = [[self alloc] init];
});
return _sharedInstance;
}
PHP中文网2017-04-18 09:57:15
A singleton was used in this place before, but now it is not used. I will consider getting rid of it. Thanks for the tip