Index: ios/showcase/core/main.mm |
diff --git a/ios/showcase/core/main.mm b/ios/showcase/core/main.mm |
index ca3097d83ce30c1838e70e8b6893c18f1e8bc587..89c2c69ffa4397463db2901a6acfba7be65101b3 100644 |
--- a/ios/showcase/core/main.mm |
+++ b/ios/showcase/core/main.mm |
@@ -3,6 +3,8 @@ |
// found in the LICENSE file. |
#import <UIKit/UIKit.h> |
+ |
+#include "base/at_exit.h" |
#import "ios/showcase/core/app_delegate.h" |
#if !defined(__has_feature) || !__has_feature(objc_arc) |
@@ -10,6 +12,10 @@ |
#endif |
int main(int argc, char* argv[]) { |
+ // This needs to be stack allocated and live for the lifetime of |
+ // the app. |
+ base::AtExitManager at_exit; |
+ |
@autoreleasepool { |
return UIApplicationMain(argc, argv, nil, |
NSStringFromClass([AppDelegate class])); |