Skip to content

Commit 334f61b

Browse files
committed
fix decode animated image leak
1 parent 52eca55 commit 334f61b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

SDWebImageAVIFCoder/Classes/SDImageAVIFCoder.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ - (UIImage *)decodedImageWithData:(NSData *)data options:(SDImageCoderOptions *)
149149
#else
150150
UIImage *image = [[UIImage alloc] initWithCGImage:imageRef scale:scale orientation:UIImageOrientationUp];
151151
#endif
152+
CGImageRelease(imageRef);
152153
NSTimeInterval duration = decoder->imageTiming.duration; // Should use `decoder->imageTiming`, not the `decoder->duration`, see libavif source code
153154
SDImageFrame *frame = [SDImageFrame frameWithImage:image duration:duration];
154155
[frames addObject:frame];

0 commit comments

Comments
 (0)