Commit 7d10a819 authored by Tobias's avatar Tobias

fix leak

parent 66481080
......@@ -66,8 +66,11 @@
CGContextSetInterpolationQuality(contextRef, kCGInterpolationLow);
CGContextDrawImage(contextRef, (CGRect){CGPointZero, destinationRect.size}, cgImage);
return [UIImage imageWithCGImage:CGBitmapContextCreateImage(contextRef)];
CGImageRef imageRef = CGBitmapContextCreateImage(contextRef);
UIImage *scaledImage = [UIImage imageWithCGImage:imageRef];
return scaledImage;
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