Skip to content

Commit

Permalink
MMMLoadableImage: fix the mem leak added with GIF support
Browse files Browse the repository at this point in the history
  • Loading branch information
aleh committed Feb 16, 2024
1 parent 73cc44e commit d0cca7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MMMLoadable.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Pod::Spec.new do |s|

s.name = "MMMLoadable"
s.version = "2.1.0"
s.version = "2.1.1"
s.summary = "A simple model for async calculations"
s.description = "#{s.summary}."
s.homepage = "https://github.com/mediamonks/#{s.name}"
Expand Down
6 changes: 5 additions & 1 deletion Sources/MMMLoadableObjC/MMMLoadableImage.m
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,11 @@ - (UIImage *)imageWithData:(NSData *)data {

NSTimeInterval delayTime = MAX([delayTimeNum doubleValue], 0.1);

return [UIImage animatedImageWithImages:images duration:delayTime * count];
UIImage *result = [UIImage animatedImageWithImages:images duration:delayTime * count];

CFRelease(source);

return result;
}

- (void)didFinishSuccessfullyWithResponse:(NSURLResponse *)response data:(NSData *)data {
Expand Down

0 comments on commit d0cca7c

Please sign in to comment.