Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed 2 memory leaks

Fix CGColorSpaceRef & CGGradientRef Memory Leaks
  • Loading branch information...
commit 848999d895549f715c2e58efe4e35268827bf48f 1 parent 5cde740
@ShadyElyaski authored
Showing with 8 additions and 0 deletions.
  1. +4 −0 SEFilterControl.m
  2. +4 −0 SEFilterKnob.m
View
4 SEFilterControl.m
@@ -167,6 +167,10 @@ -(void)drawRect:(CGRect)rect{
CGContextAddEllipseInRect(context, CGRectMake(centerPoint.x-15, rect.size.height-42.5f, 25, 25));
CGContextClip(context);
CGContextDrawLinearGradient (context, gradient, CGPointMake(0, 0), CGPointMake(0,rect.size.height), 0);
+
+ CGGradientRelease(gradient);
+ CGColorSpaceRelease(baseSpace);
+
CGContextRestoreGState(context);
//Draw White Bottom Shadow
View
4 SEFilterKnob.m
@@ -87,6 +87,10 @@ - (void)drawRect:(CGRect)rect
CGContextAddEllipseInRect(context, CGRectMake(rect.origin.x+1.5f, rect.origin.y+1, 32, 32));
CGContextClip(context);
CGContextDrawLinearGradient (context, gradient, CGPointMake(0, 0), CGPointMake(0,rect.size.height), 0);
+
+ CGGradientRelease(gradient);
+ CGColorSpaceRelease(baseSpace);
+
CGContextRestoreGState(context);
}
Please sign in to comment.
Something went wrong with that request. Please try again.