为什么WXInvocationConfig这个抽象类会使用单例模式?
+ (instancetype)sharedInstance
{
static id _sharedInstance;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_sharedInstance = [[self alloc] init];
});
return _sharedInstance;
}
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
这个地方之前有用到单例,现在没有用到,会考虑干掉,谢谢提示