Commit 7d10a819 authored by Tobias's avatar Tobias

fix leak

parent 66481080
...@@ -66,8 +66,11 @@ ...@@ -66,8 +66,11 @@
CGContextSetInterpolationQuality(contextRef, kCGInterpolationLow); CGContextSetInterpolationQuality(contextRef, kCGInterpolationLow);
CGContextDrawImage(contextRef, (CGRect){CGPointZero, destinationRect.size}, cgImage); CGContextDrawImage(contextRef, (CGRect){CGPointZero, destinationRect.size}, cgImage);
CGImageRef imageRef = CGBitmapContextCreateImage(contextRef);
return [UIImage imageWithCGImage:CGBitmapContextCreateImage(contextRef)]; UIImage *scaledImage = [UIImage imageWithCGImage:imageRef];
CGImageRelease(imageRef);
CGContextRelease(contextRef);
return scaledImage;
} }
@end @end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment