From: Jay Freeman (saurik) <saurik@saurik.com> Date: Fri, 11 Mar 2011 00:40:36 +0000 (-0800) Subject: Add (disabled) memory warning flood mechanism. X-Git-Tag: v1.1.0%b5~7 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/968afbcd896f7ef91177add5e15acfc9d711f0e0 Add (disabled) memory warning flood mechanism. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 8d60efab..b6f1d68b 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -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];