[iOS] Fix glyph path and clip path release.

This commit is contained in:
Mikael Sand
2019-01-12 22:19:59 +02:00
parent 9ac9e549e3
commit c69ac574cd
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -283,6 +283,9 @@ CGFloat const RNSVG_DEFAULT_FONT_SIZE = 12;
{ {
if (self.clipPath) { if (self.clipPath) {
_clipNode = (RNSVGClipPath*)[self.svgView getDefinedClipPath:self.clipPath]; _clipNode = (RNSVGClipPath*)[self.svgView getDefinedClipPath:self.clipPath];
if (_cachedClipPath) {
CGPathRelease(_cachedClipPath);
}
_cachedClipPath = CGPathRetain([_clipNode getPath:context]); _cachedClipPath = CGPathRetain([_clipNode getPath:context]);
if (_clipMask) { if (_clipMask) {
CGImageRelease(_clipMask); CGImageRelease(_clipMask);
+2
View File
@@ -752,8 +752,10 @@ static CGFloat RNSVGTSpan_radToDeg = 180 / (CGFloat)M_PI;
// Glyphs whose midpoint-on-the-path are off the path are not rendered. // Glyphs whose midpoint-on-the-path are off the path are not rendered.
if (midPoint > endOfRendering) { if (midPoint > endOfRendering) {
CGPathRelease(glyphPath);
continue; continue;
} else if (midPoint < startOfRendering) { } else if (midPoint < startOfRendering) {
CGPathRelease(glyphPath);
continue; continue;
} }