From 114e15cb978208018a4a5eb774c28f129d28666f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E5=9F=B9?= <465821361@qq.com> Date: Mon, 12 Nov 2018 20:11:46 +0800 Subject: [PATCH] release the CGImageRef object maybe you forget to release the extendedImage when frameData is not nil --- YYImage/YYImageCoder.m | 1 + 1 file changed, 1 insertion(+) diff --git a/YYImage/YYImageCoder.m b/YYImage/YYImageCoder.m index 66cf46e..f537e49 100644 --- a/YYImage/YYImageCoder.m +++ b/YYImage/YYImageCoder.m @@ -2561,6 +2561,7 @@ - (NSData *)_encodeAPNG { CFRelease(extendedImage); return nil; } + CFRelease(extendedImage); pngDatas[0] = (__bridge id)(frameData); CFRelease(frameData); }