Merge pull request #103 from fannheyward/master

Fix warning: "performSelector may cause a leak because its selector is unknown."
This commit is contained in:
Olivier Poitrey 2012-04-25 05:38:10 -07:00
commit c145057d11
1 changed files with 3 additions and 0 deletions

View File

@ -42,7 +42,10 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot
if (NSClassFromString(@"SDNetworkActivityIndicator")) if (NSClassFromString(@"SDNetworkActivityIndicator"))
{ {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
id activityIndicator = [NSClassFromString(@"SDNetworkActivityIndicator") performSelector:NSSelectorFromString(@"sharedActivityIndicator")]; id activityIndicator = [NSClassFromString(@"SDNetworkActivityIndicator") performSelector:NSSelectorFromString(@"sharedActivityIndicator")];
#pragma clang diagnostic pop
// Remove observer in case it was previously added. // Remove observer in case it was previously added.
[[NSNotificationCenter defaultCenter] removeObserver:activityIndicator name:SDWebImageDownloadStartNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:activityIndicator name:SDWebImageDownloadStartNotification object:nil];