Skip to content

Commit

Permalink
Merge pull request #50 from theill/patch-1
Browse files Browse the repository at this point in the history
Explicitly sets _imageSource NULL after CFRelease
  • Loading branch information
Nyx0uf committed Mar 26, 2015
2 parents 6a22d36 + 96d09e4 commit 1c0e053
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Classes/NYXProgressiveImageView.m
Expand Up @@ -296,7 +296,10 @@ -(void)connectionDidFinishLoading:(__unused NSURLConnection*)connection
}

if (_imageSource)
{
CFRelease(_imageSource);
_imageSource = NULL;
}
_connection = nil;
_url = nil;
_downloading = NO;
Expand All @@ -314,7 +317,10 @@ -(void)connection:(__unused NSURLConnection*)connection didFailWithError:(__unus

_dataTemp = nil;
if (_imageSource)
{
CFRelease(_imageSource);
_imageSource = NULL;
}
_connection = nil;
_url = nil;
_downloading = NO;
Expand Down

0 comments on commit 1c0e053

Please sign in to comment.