aboutsummaryrefslogtreecommitdiffstats
path: root/examples/cocoa-touch-application/CocoaTouchApplication/AppDelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cocoa-touch-application/CocoaTouchApplication/AppDelegate.m')
-rw-r--r--examples/cocoa-touch-application/CocoaTouchApplication/AppDelegate.m24
1 files changed, 8 insertions, 16 deletions
diff --git a/examples/cocoa-touch-application/CocoaTouchApplication/AppDelegate.m b/examples/cocoa-touch-application/CocoaTouchApplication/AppDelegate.m
index ed4d9f310..b93bcf2c7 100644
--- a/examples/cocoa-touch-application/CocoaTouchApplication/AppDelegate.m
+++ b/examples/cocoa-touch-application/CocoaTouchApplication/AppDelegate.m
@@ -40,32 +40,24 @@
@synthesize navigationController = _navigationController;
@synthesize splitViewController = _splitViewController;
-- (void)dealloc
-{
- [_window release];
- [_navigationController release];
- [_splitViewController release];
- [super dealloc];
-}
-
- (BOOL)application:(UIApplication *) __unused application didFinishLaunchingWithOptions:(NSDictionary *) __unused launchOptions
{
- self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
- MasterViewController *masterViewController = [[[MasterViewController alloc] initWithNibName:@"MasterViewController_iPhone" bundle:nil] autorelease];
- self.navigationController = [[[UINavigationController alloc] initWithRootViewController:masterViewController] autorelease];
+ MasterViewController *masterViewController = [[MasterViewController alloc] initWithNibName:@"MasterViewController_iPhone" bundle:nil];
+ self.navigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController];
self.window.rootViewController = self.navigationController;
} else {
- MasterViewController *masterViewController = [[[MasterViewController alloc] initWithNibName:@"MasterViewController_iPad" bundle:nil] autorelease];
- UINavigationController *masterNavigationController = [[[UINavigationController alloc] initWithRootViewController:masterViewController] autorelease];
+ MasterViewController *masterViewController = [[MasterViewController alloc] initWithNibName:@"MasterViewController_iPad" bundle:nil];
+ UINavigationController *masterNavigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController];
- DetailViewController *detailViewController = [[[DetailViewController alloc] initWithNibName:@"DetailViewController_iPad" bundle:nil] autorelease];
- UINavigationController *detailNavigationController = [[[UINavigationController alloc] initWithRootViewController:detailViewController] autorelease];
+ DetailViewController *detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController_iPad" bundle:nil];
+ UINavigationController *detailNavigationController = [[UINavigationController alloc] initWithRootViewController:detailViewController];
masterViewController.detailViewController = detailViewController;
- self.splitViewController = [[[UISplitViewController alloc] init] autorelease];
+ self.splitViewController = [[UISplitViewController alloc] init];
self.splitViewController.delegate = detailViewController;
self.splitViewController.viewControllers = [NSArray arrayWithObjects:masterNavigationController, detailNavigationController, nil];