Updated Branches: refs/heads/master 31797a702 -> c573953b7
[CB-1514] Xcode 4.5 - Static Analyzer Issues in CordovaLib and default template 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/c573953b Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/c573953b Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/c573953b Branch: refs/heads/master Commit: c573953b7e3de06676a9854973143d4d3ff5cc55 Parents: 31797a7 Author: Shazron Abdullah <shaz...@apache.org> Authored: Fri Sep 21 13:04:32 2012 -0700 Committer: Shazron Abdullah <shaz...@apache.org> Committed: Fri Sep 21 13:04:32 2012 -0700 ---------------------------------------------------------------------- CordovaLib/Classes/CDVViewController.m | 10 +++++----- .../project/__TESTING__/Classes/AppDelegate.m | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/c573953b/CordovaLib/Classes/CDVViewController.m ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m index 562820c..bd444d5 100644 --- a/CordovaLib/Classes/CDVViewController.m +++ b/CordovaLib/Classes/CDVViewController.m @@ -45,7 +45,7 @@ @synthesize imageView, activityView, useSplashScreen, commandDelegate; @synthesize wwwFolderName, startPage, invokeString, initialized; -- (id)__init +- (void)__init { if ((self != nil) && !self.initialized) { [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; @@ -85,20 +85,20 @@ // register this viewcontroller with the NSURLProtocol [CDVURLProtocol registerViewController:self]; } - - return self; } - (id)initWithNibName:(NSString*)nibNameOrNil bundle:(NSBundle*)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - return [self __init]; + [self __init]; + return self; } - (id)init { self = [super init]; - return [self __init]; + [self __init]; + return self; } // TODO(agrieve): It's probably better to change these to be weak references. http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/c573953b/bin/templates/project/__TESTING__/Classes/AppDelegate.m ---------------------------------------------------------------------- diff --git a/bin/templates/project/__TESTING__/Classes/AppDelegate.m b/bin/templates/project/__TESTING__/Classes/AppDelegate.m index f188074..5803726 100644 --- a/bin/templates/project/__TESTING__/Classes/AppDelegate.m +++ b/bin/templates/project/__TESTING__/Classes/AppDelegate.m @@ -63,10 +63,10 @@ } CGRect screenBounds = [[UIScreen mainScreen] bounds]; - self.window = [[UIWindow alloc] initWithFrame:screenBounds]; + self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease]; self.window.autoresizesSubviews = YES; - self.viewController = [[MainViewController alloc] init]; + self.viewController = [[[MainViewController alloc] init] autorelease]; self.viewController.useSplashScreen = YES; self.viewController.wwwFolderName = @"www"; self.viewController.startPage = @"index.html";