aboutsummaryrefslogtreecommitdiffhomepage
path: root/example
diff options
context:
space:
mode:
authorGravatar Jonathan Willing <jwilling@me.com>2013-04-09 00:10:57 -0500
committerGravatar Jonathan Willing <jwilling@me.com>2013-04-09 00:10:57 -0500
commit3f350cce0c07a4d532337b6e3e912f536dd57525 (patch)
treeb9581c14d4241b9fe2cb762710554b94069fef3a /example
parent6d2d5664f1c9d24034f8a7c339aceed42292bda3 (diff)
resolve issue with autorelease pools
Diffstat (limited to 'example')
-rw-r--r--example/ios/iOS UI Test/iOS UI Test.xcodeproj/project.pbxproj16
-rw-r--r--example/ios/iOS UI Test/iOS UI Test/Application.mm (renamed from example/ios/iOS UI Test/iOS UI Test/Application.m)8
-rw-r--r--example/ios/iOS UI Test/iOS UI Test/main.m19
-rw-r--r--example/ios/iOS UI Test/iOS UI Test/main.mm19
4 files changed, 31 insertions, 31 deletions
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 = "<group>"; };
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 = "<group>"; };
- AB7BA4501713CE3300104953 /* Application.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Application.m; sourceTree = "<group>"; };
+ AB7BA4501713CE3300104953 /* Application.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Application.mm; sourceTree = "<group>"; };
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 = "<group>"; };
AB9EAE0F170368F000D750C7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
- AB9EAE11170368F000D750C7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ AB9EAE11170368F000D750C7 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
AB9EAE13170368F000D750C7 /* iOS UI Test-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iOS UI Test-Prefix.pch"; sourceTree = "<group>"; };
AB9EAE14170368F000D750C7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
AB9EAE15170368F000D750C7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -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.mm
index d9a6c292..48185d5b 100644
--- a/example/ios/iOS UI Test/iOS UI Test/Application.m
+++ b/example/ios/iOS UI Test/iOS UI Test/Application.mm
@@ -1,5 +1,5 @@
//
-// Application.m
+// Application.mm
// iOS UI Test
//
// Created by Jonathan Willing on 4/8/13.
@@ -7,14 +7,14 @@
//
#import "Application.h"
-#import <mailcore/mailcore.h>
+#import <MailCore/MailCore.h>
@implementation Application
- (void)sendEvent:(UIEvent *)event {
- //mailcore::AutoreleasePool * pool = new mailcore::AutoreleasePool();
+ 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 <UIKit/UIKit.h>
-
-#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 <UIKit/UIKit.h>
+
+#import "AppDelegate.h"
+#import "Application.h"
+#import <MailCore/MailCore.h>
+
+int main(int argc, char *argv[]) {
+ mailcore::AutoreleasePool *pool = new mailcore::AutoreleasePool();
+ return UIApplicationMain(argc, argv, NSStringFromClass([Application class]), NSStringFromClass([AppDelegate class]));
+ pool->release();
+}