summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-21 04:37:38 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-21 04:37:38 -0700
commit9256a1ce33a4102a678fe087f072edcc0c0b7b02 (patch)
treefad235464c4bdb35ac893cae482bf8af59a0b086
parent6271cb576bfcb3316e094c5ebe6f12bee2ca23c6 (diff)
Clear NSURLCache during memory warnings.
-rw-r--r--MobileCydia.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index badaa61..face09b 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -9764,6 +9764,11 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
}
}
+- (void) applicationDidReceiveMemoryWarning:(UIApplication *)application {
+ NSLog(@"--");
+ [[NSURLCache sharedURLCache] removeAllCachedResponses];
+}
+
- (void) applicationDidFinishLaunching:(id)unused {
//[NSThread detachNewThreadSelector:@selector(_sendMemoryWarningNotifications) toTarget:self withObject:nil];