Skip to content

Commit 74e97d3

Browse files
committed
bug-fix: use NSCache instead of NSMutableDictionary avoid thread safe issue.
1 parent 6bbf771 commit 74e97d3

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

SVGAPlayer.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Pod::Spec.new do |s|
33

44
s.name = "SVGAPlayer"
5-
s.version = "1.1.2"
5+
s.version = "1.1.3"
66
s.summary = "SVGAPlayer 是一个高性能的动画播放器"
77

88
s.description = <<-DESC
@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
1313

1414
s.homepage = "http://code.yy.com/ued/SVGAPlayer"
1515

16-
s.license = "Private"
16+
s.license = "Apache 2.0"
1717

1818
s.author = { "PonyCui" => "cuiminghui1@yy.com" }
1919

Source/SVGABezierPath.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
@implementation SVGABezierPath
1212

1313
- (void)setValues:(nonnull NSString *)values {
14-
static NSMutableDictionary *caches;
14+
static NSCache *caches;
1515
static NSArray *validMethods;
1616
static dispatch_once_t onceToken;
1717
dispatch_once(&onceToken, ^{
18-
caches = [NSMutableDictionary dictionary];
18+
caches = [NSCache new];
1919
validMethods = @[@"M",@"L",@"H",@"V",@"C",@"S",@"Q",@"R",@"A",@"Z",@"m",@"l",@"h",@"v",@"c",@"s",@"q",@"r",@"a",@"z"];
2020
});
2121
if ([caches objectForKey:values] != nil) {

0 commit comments

Comments
 (0)