[iOS] Fix group auto release and path release.

This commit is contained in:
Mikael Sand
2019-01-12 22:04:41 +02:00
parent a25f05da47
commit 9ac9e549e3
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -135,7 +135,7 @@
return YES; return YES;
}]; }];
cached = CGPathRetain(path); cached = CGPathRetain(CFAutorelease(path));
self.path = cached; self.path = cached;
return cached; return cached;
} }
+2
View File
@@ -78,6 +78,7 @@ CGFloat const RNSVG_DEFAULT_FONT_SIZE = 12;
- (void)clearPath - (void)clearPath
{ {
CGPathRelease(_path);
self.path = nil; self.path = nil;
} }
@@ -546,6 +547,7 @@ CGFloat const RNSVG_DEFAULT_FONT_SIZE = 12;
{ {
CGPathRelease(_cachedClipPath); CGPathRelease(_cachedClipPath);
CGImageRelease(_clipMask); CGImageRelease(_clipMask);
CGPathRelease(_path);
_clipMask = nil; _clipMask = nil;
} }
+1 -1
View File
@@ -40,6 +40,7 @@
if (self.dirty || self.merging) { if (self.dirty || self.merging) {
return; return;
} }
_srcHitPath = nil;
[super invalidate]; [super invalidate];
self.dirty = true; self.dirty = true;
} }
@@ -155,7 +156,6 @@
- (void)dealloc - (void)dealloc
{ {
self.path = nil;
CGPathRelease(_hitArea); CGPathRelease(_hitArea);
CGPathRelease(_strokePath); CGPathRelease(_strokePath);
_sourceStrokeDashArray = nil; _sourceStrokeDashArray = nil;