From 85106ebe9dbdfa8fcb70c1ce325b8cb4cade98b2 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 21 Mar 2011 01:13:02 -0700 Subject: [PATCH] Support 2.x memory warning dispatch. --- MobileCydia.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index bee020a2..6daaf5b8 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 { -- 2.47.2