Fix memory leaks

This commit is contained in:
Horcrux
2017-01-11 19:31:42 +08:00
parent 6e81ecf147
commit dcc39c4b67
4 changed files with 18 additions and 9 deletions
+3 -1
View File
@@ -94,7 +94,9 @@
{
CGRect rect = [self getRect:context];
// add hit area
self.hitArea = CGPathCreateWithRect(rect, nil);
CGPathRef hitArea = CGPathCreateWithRect(rect, nil);
[self setHitArea:hitArea];
CGPathRelease(hitArea);
[self clip:context];
CGContextSaveGState(context);