You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2015/03/13 00:13:23 UTC
ios commit: CB-8464 - Remove non-ARC code in AppDelegate
Repository: cordova-ios
Updated Branches:
refs/heads/4.0.x 0053d35b4 -> 4d60a630a
CB-8464 - Remove non-ARC code in AppDelegate
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/4d60a630
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/4d60a630
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/4d60a630
Branch: refs/heads/4.0.x
Commit: 4d60a630a203f149dff46c02cb59c0bd0438c082
Parents: 0053d35
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Mar 12 16:13:22 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Mar 12 16:13:22 2015 -0700
----------------------------------------------------------------------
CordovaLib/Classes/CDVAppDelegate.m | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/4d60a630/CordovaLib/Classes/CDVAppDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVAppDelegate.m b/CordovaLib/Classes/CDVAppDelegate.m
index ab81d7d..d582161 100644
--- a/CordovaLib/Classes/CDVAppDelegate.m
+++ b/CordovaLib/Classes/CDVAppDelegate.m
@@ -34,11 +34,7 @@
int cacheSizeMemory = 8 * 1024 * 1024; // 8MB
int cacheSizeDisk = 32 * 1024 * 1024; // 32MB
-#if __has_feature(objc_arc)
- NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"];
-#else
- NSURLCache* sharedCache = [[[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"] autorelease];
-#endif
+ NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"];
[NSURLCache setSharedURLCache:sharedCache];
self = [super init];
@@ -54,20 +50,12 @@
{
CGRect screenBounds = [[UIScreen mainScreen] bounds];
-#if __has_feature(objc_arc)
- self.window = [[UIWindow alloc] initWithFrame:screenBounds];
-#else
- self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
-#endif
+ self.window = [[UIWindow alloc] initWithFrame:screenBounds];
self.window.autoresizesSubviews = YES;
// only set if not already set in subclass
if (self.viewController == nil) {
-#if __has_feature(objc_arc)
- self.viewController = [[CDVViewController alloc] init];
-#else
- self.viewController = [[[CDVViewController alloc] init] autorelease];
-#endif
+ self.viewController = [[CDVViewController alloc] init];
}
// Set your app's start page by setting the <content src='foo.html' /> tag in config.xml.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org