我在2448 X 2448像素图像上运行此代码. fullScaleView也是2448 X 2448(fullScreenView Rect:{{0,0},{2448,2448}}).方法完成后,App内存从49.7MB跳至240MB,降至172MB.它保持在172MB.在这个renderInContext之后,应用程序似乎仍然不能在如此高的内存占用率下运行.我应该在何处以及如何强制释放? (iOS 7 XCode 5 ARC).
UIGraphicsBeginImageContextWithOptions(fullScaleView.bounds.size,fullScaleView.opaque,1.0); [fullScaleView.layer renderInContext: UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetimageFromCurrentimageContext(); UIGraphicsEndImageContext();