]> git.saurik.com Git - cydia.git/commitdiff
Add (disabled) memory warning flood mechanism.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 11 Mar 2011 00:40:36 +0000 (16:40 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 11 Mar 2011 00:56:49 +0000 (16:56 -0800)
MobileCydia.mm

index 8d60efabb4e8d593e667080ecea65042bff2da9d..b6f1d68b23d72b96a24283e8e69b79512e624f9e 100644 (file)
@@ -9636,7 +9636,20 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     [tabbar_ setUpdateDelegate:self];
 }
 
+- (void) _sendMemoryWarningNotification {
+    [[NSNotificationCenter defaultCenter] postNotificationName:@"UIApplicationDidReceiveMemoryWarningNotification" object:[UIApplication sharedApplication]];
+}
+
+- (void) _sendMemoryWarningNotifications {
+    while (true) {
+        [self performSelectorOnMainThread:@selector(_sendMemoryWarningNotification) withObject:nil waitUntilDone:NO];
+        usleep(250000);
+    }
+}
+
 - (void) applicationDidFinishLaunching:(id)unused {
+    //[NSThread detachNewThreadSelector:@selector(_sendMemoryWarningNotifications) toTarget:self withObject:nil];
+
 _trace();
     if ([self respondsToSelector:@selector(setApplicationSupportsShakeToEdit:)])
         [self setApplicationSupportsShakeToEdit:NO];