0
在我的繪圖應用程序中,我使用UIImage在其上緩存繪圖。如何解決使用UIGraphicsGetImageFromCurrentImageContext時因內存問題而終止?
下面的代碼行導致內存問題:
UIGraphicsBeginImageContextWithOptions(self.bounds.size, NO, 0.0);
self.cacheImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
如何使用UIGraphicsGetImageFromCurrentImageContext
不會造成內存泄漏?
任何幫助將不勝感激。提前致謝。
它工作正常,現在 謝謝你這麼多 – Abdelrahman
感謝@Abdelrahman –