fix memory leak issue with CGMutablePathRef

This commit is contained in:
Horcrux
2016-07-21 18:22:23 +08:00
parent ff2395bcc2
commit 5ee5c2239a
35 changed files with 164 additions and 185 deletions
+5 -4
View File
@@ -31,13 +31,14 @@
return;
}
// Add path to nodeArea
CGPathAddPath(self.nodeArea, nil, _d);
// Add path to hitArea
self.hitArea = CGPathCreateMutableCopy(_d);
if (self.stroke) {
// Add stroke to nodeArea
// Add stroke to hitArea
CGPathRef strokePath = CGPathCreateCopyByStrokingPath(_d, nil, self.strokeWidth, self.strokeLinecap, self.strokeLinejoin, self.strokeMiterlimit);
CGPathAddPath(self.nodeArea, nil, strokePath);
CGPathAddPath(self.hitArea, nil, strokePath);
CGPathRelease(strokePath);
}
if (self.opacity == 0) {