執行CGImageCreateWithImageInRect方法之后,需要執行CGImageRelease釋放CGImageRef
如下是官方文檔上的介紹注意點:
The resulting image retains a reference to the original image, which means you may release the original image after calling this function.
begin至end中間的繪制代碼沒有必要,拿到CGImageRef之后,直接[UIImage imageWithCGImage:imageRef]就能拿到圖片
如下是官方文檔上的介紹注意點:
The resulting image retains a reference to the original image, which means you may release the original image after calling this function.
begin至end中間的繪制代碼沒有必要,拿到CGImageRef之后,直接[UIImage imageWithCGImage:imageRef]就能拿到圖片
2016-12-17