mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-09 01:25:01 +00:00
[iOS] Fix group auto release and path release.
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user