Updated Branches: refs/heads/master 7b0e6c6e5 -> 4c37661a6
Fix ARC errors in CordovaLibApp. Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/4c37661a Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/4c37661a Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/4c37661a Branch: refs/heads/master Commit: 4c37661a68049c75510d19d41d874ebd701bc8c1 Parents: 2fab10f Author: Andrew Grieve <agri...@chromium.org> Authored: Tue Aug 7 14:40:59 2012 -0400 Committer: Andrew Grieve <agri...@chromium.org> Committed: Tue Aug 7 14:40:59 2012 -0400 ---------------------------------------------------------------------- CordovaLib/CordovaLibApp/AppDelegate.m | 11 ++--------- CordovaLib/CordovaLibApp/main.m | 7 +++---- 2 files changed, 5 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/4c37661a/CordovaLib/CordovaLibApp/AppDelegate.m ---------------------------------------------------------------------- diff --git a/CordovaLib/CordovaLibApp/AppDelegate.m b/CordovaLib/CordovaLibApp/AppDelegate.m index 81d2fe0..292e376 100644 --- a/CordovaLib/CordovaLibApp/AppDelegate.m +++ b/CordovaLib/CordovaLibApp/AppDelegate.m @@ -26,18 +26,11 @@ @synthesize window = _window; @synthesize viewController = _viewController; -- (void)dealloc -{ - [_window release]; - [_viewController release]; - [super dealloc]; -} - - (void)createViewController { NSAssert(!self.viewController, @"ViewController already created."); CGRect viewBounds = [[UIScreen mainScreen] applicationFrame]; - self.viewController = [[[ViewController alloc] init] autorelease]; + self.viewController = [[ViewController alloc] init]; self.viewController.useSplashScreen = YES; self.viewController.wwwFolderName = @"www"; self.viewController.startPage = @"index.html"; @@ -57,7 +50,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { CGRect screenBounds = [[UIScreen mainScreen] bounds]; - self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease]; + self.window = [[UIWindow alloc] initWithFrame:screenBounds]; self.window.autoresizesSubviews = YES; // Create the main view on start-up only when not running unit tests. http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/4c37661a/CordovaLib/CordovaLibApp/main.m ---------------------------------------------------------------------- diff --git a/CordovaLib/CordovaLibApp/main.m b/CordovaLib/CordovaLibApp/main.m index beae0aa..e8a42e4 100644 --- a/CordovaLib/CordovaLibApp/main.m +++ b/CordovaLib/CordovaLibApp/main.m @@ -24,8 +24,7 @@ int main(int argc, char *argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - int ret = UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - [pool release]; - return ret; + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } }