Этот код утечки, если кто-то может сказать мне, почему?
UIGraphicsBeginImageContext(drawingImage.frame.size);
[drawingImage.image drawInRect:CGRectMake(0, 0, drawingImage.frame.size.width, drawingImage.frame.size.height)];
// Draw some vectorial data
// ...
// Apply an image mask
CGImageRef maskRef = mask.CGImage;
CGImageRef cgmask = CGImageMaskCreate(CGImageGetWidth(maskRef),
CGImageGetHeight(maskRef),
CGImageGetBitsPerComponent(maskRef),
CGImageGetBitsPerPixel(maskRef),
CGImageGetBytesPerRow(maskRef),
CGImageGetDataProvider(maskRef), NULL, false);
CGImageRef masked = CGImageCreateWithMask([UIGraphicsGetImageFromCurrentImageContext() CGImage], cgmask);
CGImageRelease(cgmask);
drawingImage.image = [UIImage imageWithCGImage:masked];
UIGraphicsEndImageContext();