OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import <UIKit/UIKit.h> | 5 #import <UIKit/UIKit.h> |
| 6 |
| 7 #include "base/at_exit.h" |
6 #import "ios/showcase/core/app_delegate.h" | 8 #import "ios/showcase/core/app_delegate.h" |
7 | 9 |
8 #if !defined(__has_feature) || !__has_feature(objc_arc) | 10 #if !defined(__has_feature) || !__has_feature(objc_arc) |
9 #error "This file requires ARC support." | 11 #error "This file requires ARC support." |
10 #endif | 12 #endif |
11 | 13 |
12 int main(int argc, char* argv[]) { | 14 int main(int argc, char* argv[]) { |
| 15 // This needs to be stack allocated and live for the lifetime of |
| 16 // the app. |
| 17 base::AtExitManager at_exit; |
| 18 |
13 @autoreleasepool { | 19 @autoreleasepool { |
14 return UIApplicationMain(argc, argv, nil, | 20 return UIApplicationMain(argc, argv, nil, |
15 NSStringFromClass([AppDelegate class])); | 21 NSStringFromClass([AppDelegate class])); |
16 } | 22 } |
17 } | 23 } |
OLD | NEW |