diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-21 01:13:02 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-21 01:13:02 -0700 |
commit | 85106ebe9dbdfa8fcb70c1ce325b8cb4cade98b2 (patch) | |
tree | 5a892fec22972a46f9bae32530ad04425b949d06 | |
parent | 740f9f75d3e5828dfd087799b9369eee006e36a7 (diff) |
Support 2.x memory warning dispatch.
-rw-r--r-- | MobileCydia.mm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index bee020a..6daaf5b 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -9726,7 +9726,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (void) _sendMemoryWarningNotification { - [[NSNotificationCenter defaultCenter] postNotificationName:@"UIApplicationDidReceiveMemoryWarningNotification" object:[UIApplication sharedApplication]]; + if (kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iPhoneOS_3_0) // XXX: maybe 4_0? + [[NSNotificationCenter defaultCenter] postNotificationName:@"UIApplicationMemoryWarningNotification" object:[UIApplication sharedApplication]]; + else + [[NSNotificationCenter defaultCenter] postNotificationName:@"UIApplicationDidReceiveMemoryWarningNotification" object:[UIApplication sharedApplication]]; } - (void) _sendMemoryWarningNotifications { |