summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qtmain.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2012-12-25 21:55:10 +0100
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-27 23:56:01 +0100
commit78fec3372ad819cc93b9cfb5bd3df2da6d792cbd (patch)
treea9a79f925144101a4e237497f1ec13ed3478b7dc /src/plugins/platforms/ios/qtmain.mm
parentb05c20b4f33b35c8b3428caf2ee59675d858d5ab (diff)
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>
Diffstat (limited to 'src/plugins/platforms/ios/qtmain.mm')
-rw-r--r--src/plugins/platforms/ios/qtmain.mm7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/platforms/ios/qtmain.mm b/src/plugins/platforms/ios/qtmain.mm
index 7cc96f54b1..04151cd720 100644
--- a/src/plugins/platforms/ios/qtmain.mm
+++ b/src/plugins/platforms/ios/qtmain.mm
@@ -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];