Remove no longer necessary cleanMemory on app going to background as NSCache does this by itself

This commit is contained in:
Olivier Poitrey 2012-11-29 01:32:31 +01:00
parent d487bccf5e
commit 4284b5797e
1 changed files with 0 additions and 12 deletions

View File

@ -70,18 +70,6 @@ static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week
selector:@selector(cleanDisk) selector:@selector(cleanDisk)
name:UIApplicationWillTerminateNotification name:UIApplicationWillTerminateNotification
object:nil]; object:nil];
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_4_0
UIDevice *device = [UIDevice currentDevice];
if ([device respondsToSelector:@selector(isMultitaskingSupported)] && device.multitaskingSupported)
{
// When in background, clean memory in order to have less chance to be killed
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(clearMemory)
name:UIApplicationDidEnterBackgroundNotification
object:nil];
}
#endif
#endif #endif
} }