From 968afbcd896f7ef91177add5e15acfc9d711f0e0 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Thu, 10 Mar 2011 16:40:36 -0800 Subject: Add (disabled) memory warning flood mechanism. --- MobileCydia.mm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/MobileCydia.mm b/MobileCydia.mm index 8d60efa..b6f1d68 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]; -- cgit v1.2.3