执行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