我的iOS应用程序崩溃,它使用CoreGraphics来处理图像。iOS应用程序崩溃,频繁图像绘制到上下文
一段时间后,我已经与这段代码上来:
UIImage * image = info[UIImagePickerControllerOriginalImage]; // fromcamera
for (int i = 0; ; ++i)
{
NSLog(@"----- Step %d ---------", i);
UIGraphicsBeginImageContext(image.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextDrawImage(context, CGRectMake(0, 0, image.size.width, image.size.height), image.CGImage);
UIImage * image1 = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
}
它崩溃在我的iPhone 5 24次循环后(无法连接到设备直接 - 已使用的XCode 4.6哪些不能调试iOS 7)。
任何想法为什么?
您可以附上崩溃报告吗?你可能用完了内存,Zaph是对的。 –
正如我之前写的 - 无法使用XCode 4.6附加到iOS 7设备上。 – Werolik