Skip to content

Commit 4284b57

Browse files
author
Olivier Poitrey
committed
Remove no longer necessary cleanMemory on app going to background as NSCache does this by itself
1 parent d487bcc commit 4284b57

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

SDWebImage/SDImageCache.m

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,6 @@ - (id)initWithNamespace:(NSString *)ns
7070
selector:@selector(cleanDisk)
7171
name:UIApplicationWillTerminateNotification
7272
object:nil];
73-
74-
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_4_0
75-
UIDevice *device = [UIDevice currentDevice];
76-
if ([device respondsToSelector:@selector(isMultitaskingSupported)] && device.multitaskingSupported)
77-
{
78-
// When in background, clean memory in order to have less chance to be killed
79-
[[NSNotificationCenter defaultCenter] addObserver:self
80-
selector:@selector(clearMemory)
81-
name:UIApplicationDidEnterBackgroundNotification
82-
object:nil];
83-
}
84-
#endif
8573
#endif
8674
}
8775

0 commit comments

Comments
 (0)