iOS: Auto-release the UIWindow and root view-controller

They are retained properties.

Change-Id: Id1808d93fe30950fc05e41375f00183e098bff0b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
Tor Arne Vestbø 2012-12-25 21:55:10 +01:00
parent b05c20b4f3
commit 78fec3372a

View File

@ -55,10 +55,9 @@ extern int qt_main(int argc, char *argv[]);
- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
QIOSViewController *controller = [[QIOSViewController alloc] init];
self.window.rootViewController = controller;
controller.view = [[UIView alloc] init];
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
self.window.rootViewController = [[[QIOSViewController alloc] init] autorelease];
self.window.rootViewController.view = [[UIView alloc] init];
// Aid debugging during development
self.window.backgroundColor = [UIColor cyanColor];