mirror of
https://github.com/svga/SVGAPlayer-iOS.git
synced 2025-10-21 07:29:14 +08:00
bug-fix: use NSCache instead of NSMutableDictionary avoid thread safe issue.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
s.name = "SVGAPlayer"
|
||||
s.version = "1.1.2"
|
||||
s.version = "1.1.3"
|
||||
s.summary = "SVGAPlayer 是一个高性能的动画播放器"
|
||||
|
||||
s.description = <<-DESC
|
||||
@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
s.homepage = "http://code.yy.com/ued/SVGAPlayer"
|
||||
|
||||
s.license = "Private"
|
||||
s.license = "Apache 2.0"
|
||||
|
||||
s.author = { "PonyCui" => "cuiminghui1@yy.com" }
|
||||
|
||||
|
@@ -11,11 +11,11 @@
|
||||
@implementation SVGABezierPath
|
||||
|
||||
- (void)setValues:(nonnull NSString *)values {
|
||||
static NSMutableDictionary *caches;
|
||||
static NSCache *caches;
|
||||
static NSArray *validMethods;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
caches = [NSMutableDictionary dictionary];
|
||||
caches = [NSCache new];
|
||||
validMethods = @[@"M",@"L",@"H",@"V",@"C",@"S",@"Q",@"R",@"A",@"Z",@"m",@"l",@"h",@"v",@"c",@"s",@"q",@"r",@"a",@"z"];
|
||||
});
|
||||
if ([caches objectForKey:values] != nil) {
|
||||
|
Reference in New Issue
Block a user