Fix memory leaks

This commit is contained in:
Horcrux
2017-01-20 18:15:05 +08:00
parent 3dc529c221
commit 5075a0f67d

View File

@@ -113,8 +113,10 @@
if (_bezierTransformer) {
textPathTransform = [_bezierTransformer getTransformAtDistance:glyphPoint.x];
if ([self textPathHasReachedEnd]) {
CGPathRelease(letter);
break;
} else if (![self textPathHasReachedStart]) {
CGPathRelease(letter);
continue;
}
@@ -127,7 +129,6 @@
CGPathAddPath(path, &transform, letter);
CGPathRelease(letter);
}
}