summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-10 16:40:36 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-10 16:56:49 -0800
commit968afbcd896f7ef91177add5e15acfc9d711f0e0 (patch)
tree8de6d15c84c99734d1df9ef69e214f51496e75d3 /MobileCydia.mm
parent29bb09d7ebd2740681e58b7ad6e82e9caf117326 (diff)
Add (disabled) memory warning flood mechanism.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm13
1 files changed, 13 insertions, 0 deletions
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];