From 3f350cce0c07a4d532337b6e3e912f536dd57525 Mon Sep 17 00:00:00 2001 From: Jonathan Willing Date: Tue, 9 Apr 2013 00:10:57 -0500 Subject: resolve issue with autorelease pools --- .../iOS UI Test.xcodeproj/project.pbxproj | 16 ++++++++-------- example/ios/iOS UI Test/iOS UI Test/Application.m | 20 -------------------- example/ios/iOS UI Test/iOS UI Test/Application.mm | 20 ++++++++++++++++++++ example/ios/iOS UI Test/iOS UI Test/main.m | 19 ------------------- example/ios/iOS UI Test/iOS UI Test/main.mm | 19 +++++++++++++++++++ 5 files changed, 47 insertions(+), 47 deletions(-) delete mode 100644 example/ios/iOS UI Test/iOS UI Test/Application.m create mode 100644 example/ios/iOS UI Test/iOS UI Test/Application.mm delete mode 100644 example/ios/iOS UI Test/iOS UI Test/main.m create mode 100644 example/ios/iOS UI Test/iOS UI Test/main.mm (limited to 'example') diff --git a/example/ios/iOS UI Test/iOS UI Test.xcodeproj/project.pbxproj b/example/ios/iOS UI Test/iOS UI Test.xcodeproj/project.pbxproj index a4668c48..bb9124a9 100644 --- a/example/ios/iOS UI Test/iOS UI Test.xcodeproj/project.pbxproj +++ b/example/ios/iOS UI Test/iOS UI Test.xcodeproj/project.pbxproj @@ -10,12 +10,12 @@ AB665BCD17134336007F2151 /* FXKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = AB665BCB17134336007F2151 /* FXKeychain.m */; }; AB7BA446171389CC00104953 /* libMailCore-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AB7BA43D1713898B00104953 /* libMailCore-ios.a */; }; AB7BA4481713913F00104953 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB7BA4471713913F00104953 /* CFNetwork.framework */; }; - AB7BA4511713CE3300104953 /* Application.m in Sources */ = {isa = PBXBuildFile; fileRef = AB7BA4501713CE3300104953 /* Application.m */; }; + AB7BA4511713CE3300104953 /* Application.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB7BA4501713CE3300104953 /* Application.mm */; }; AB9EAE06170368F000D750C7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB9EAE05170368F000D750C7 /* UIKit.framework */; }; AB9EAE08170368F000D750C7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB9EAE07170368F000D750C7 /* Foundation.framework */; }; AB9EAE0A170368F000D750C7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB9EAE09170368F000D750C7 /* CoreGraphics.framework */; }; AB9EAE10170368F000D750C7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = AB9EAE0E170368F000D750C7 /* InfoPlist.strings */; }; - AB9EAE12170368F000D750C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = AB9EAE11170368F000D750C7 /* main.m */; }; + AB9EAE12170368F000D750C7 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB9EAE11170368F000D750C7 /* main.mm */; }; AB9EAE16170368F000D750C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AB9EAE15170368F000D750C7 /* AppDelegate.m */; }; AB9EAE18170368F000D750C7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = AB9EAE17170368F000D750C7 /* Default.png */; }; AB9EAE1A170368F000D750C7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AB9EAE19170368F000D750C7 /* Default@2x.png */; }; @@ -80,14 +80,14 @@ AB7BA4321713898B00104953 /* mailcore2.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = mailcore2.xcodeproj; path = "../../../../build-mac/mailcore2.xcodeproj"; sourceTree = ""; }; AB7BA4471713913F00104953 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; AB7BA44F1713CE3300104953 /* Application.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Application.h; sourceTree = ""; }; - AB7BA4501713CE3300104953 /* Application.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Application.m; sourceTree = ""; }; + AB7BA4501713CE3300104953 /* Application.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Application.mm; sourceTree = ""; }; AB9EAE02170368F000D750C7 /* iOS UI Test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS UI Test.app"; sourceTree = BUILT_PRODUCTS_DIR; }; AB9EAE05170368F000D750C7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; AB9EAE07170368F000D750C7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; AB9EAE09170368F000D750C7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; AB9EAE0D170368F000D750C7 /* iOS UI Test-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iOS UI Test-Info.plist"; sourceTree = ""; }; AB9EAE0F170368F000D750C7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - AB9EAE11170368F000D750C7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + AB9EAE11170368F000D750C7 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = ""; }; AB9EAE13170368F000D750C7 /* iOS UI Test-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iOS UI Test-Prefix.pch"; sourceTree = ""; }; AB9EAE14170368F000D750C7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; AB9EAE15170368F000D750C7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; @@ -178,9 +178,9 @@ isa = PBXGroup; children = ( AB7BA4321713898B00104953 /* mailcore2.xcodeproj */, - AB9EAE11170368F000D750C7 /* main.m */, + AB9EAE11170368F000D750C7 /* main.mm */, AB7BA44F1713CE3300104953 /* Application.h */, - AB7BA4501713CE3300104953 /* Application.m */, + AB7BA4501713CE3300104953 /* Application.mm */, AB9EAE14170368F000D750C7 /* AppDelegate.h */, AB9EAE15170368F000D750C7 /* AppDelegate.m */, AB9EAE1D170368F000D750C7 /* MainStoryboard.storyboard */, @@ -322,13 +322,13 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - AB9EAE12170368F000D750C7 /* main.m in Sources */, + AB9EAE12170368F000D750C7 /* main.mm in Sources */, AB9EAE16170368F000D750C7 /* AppDelegate.m in Sources */, AB9EAE22170368F000D750C7 /* MasterViewController.m in Sources */, AB9EAE25170368F000D750C7 /* DetailViewController.m in Sources */, AB9EAE3617036FD700D750C7 /* SettingsViewController.m in Sources */, AB665BCD17134336007F2151 /* FXKeychain.m in Sources */, - AB7BA4511713CE3300104953 /* Application.m in Sources */, + AB7BA4511713CE3300104953 /* Application.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/example/ios/iOS UI Test/iOS UI Test/Application.m b/example/ios/iOS UI Test/iOS UI Test/Application.m deleted file mode 100644 index d9a6c292..00000000 --- a/example/ios/iOS UI Test/iOS UI Test/Application.m +++ /dev/null @@ -1,20 +0,0 @@ -// -// Application.m -// iOS UI Test -// -// Created by Jonathan Willing on 4/8/13. -// Copyright (c) 2013 AppJon. All rights reserved. -// - -#import "Application.h" -#import - -@implementation Application - -- (void)sendEvent:(UIEvent *)event { - //mailcore::AutoreleasePool * pool = new mailcore::AutoreleasePool(); - [super sendEvent:event]; - -} - -@end diff --git a/example/ios/iOS UI Test/iOS UI Test/Application.mm b/example/ios/iOS UI Test/iOS UI Test/Application.mm new file mode 100644 index 00000000..48185d5b --- /dev/null +++ b/example/ios/iOS UI Test/iOS UI Test/Application.mm @@ -0,0 +1,20 @@ +// +// Application.mm +// iOS UI Test +// +// Created by Jonathan Willing on 4/8/13. +// Copyright (c) 2013 AppJon. All rights reserved. +// + +#import "Application.h" +#import + +@implementation Application + +- (void)sendEvent:(UIEvent *)event { + mailcore::AutoreleasePool *pool = new mailcore::AutoreleasePool(); + [super sendEvent:event]; + pool->release(); +} + +@end diff --git a/example/ios/iOS UI Test/iOS UI Test/main.m b/example/ios/iOS UI Test/iOS UI Test/main.m deleted file mode 100644 index d4efdd26..00000000 --- a/example/ios/iOS UI Test/iOS UI Test/main.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// main.m -// iOS UI Test -// -// Created by Jonathan Willing on 4/8/13. -// Copyright (c) 2013 AppJon. All rights reserved. -// - -#import - -#import "AppDelegate.h" -#import "Application.h" - -int main(int argc, char *argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, NSStringFromClass([Application class]), NSStringFromClass([AppDelegate class])); - } -} diff --git a/example/ios/iOS UI Test/iOS UI Test/main.mm b/example/ios/iOS UI Test/iOS UI Test/main.mm new file mode 100644 index 00000000..0ecfc348 --- /dev/null +++ b/example/ios/iOS UI Test/iOS UI Test/main.mm @@ -0,0 +1,19 @@ +// +// main.mm +// iOS UI Test +// +// Created by Jonathan Willing on 4/8/13. +// Copyright (c) 2013 AppJon. All rights reserved. +// + +#import + +#import "AppDelegate.h" +#import "Application.h" +#import + +int main(int argc, char *argv[]) { + mailcore::AutoreleasePool *pool = new mailcore::AutoreleasePool(); + return UIApplicationMain(argc, argv, NSStringFromClass([Application class]), NSStringFromClass([AppDelegate class])); + pool->release(); +} -- cgit v1.2.3