【发布时间】:2015-07-25 11:59:36
【问题描述】:
我有这个代码:
CGImageRef imageRef = CGImageCreateWithImageInRect([image CGImage], rect);
UIImage *outputimage = [UIImage imageWithCGImage:imageRef
scale:image.scale
orientation:UIImageOrientationUp];
我收到警告:
对象泄露:分配并存储到“imageRef”中的对象不是 稍后在此执行路径中引用,并且保留计数为 +1
但我使用的是 ARC,无法使用 release 或 autoRelease。如何解决?
【问题讨论】:
标签: ios memory-leaks cgimageref