diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2013-05-04 16:12:07 -0700 |
---|---|---|
committer | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2013-05-04 16:46:41 -0700 |
commit | 729667252cd632357a3277ce1ef3220e5d61caf5 (patch) | |
tree | 6bf16f2122efcc7d9d260bc992bb96fc7d679e89 /example/mac | |
parent | 4f3dd27b20c155767100a0395553ad068135d750 (diff) |
use NSAutoreleasePool on Mac/iOS to implement MCAutoreleasePool
Diffstat (limited to 'example/mac')
5 files changed, 3 insertions, 44 deletions
diff --git a/example/mac/macExample/macExample.xcodeproj/project.pbxproj b/example/mac/macExample/macExample.xcodeproj/project.pbxproj index e0c08c51..3513d61e 100644 --- a/example/mac/macExample/macExample.xcodeproj/project.pbxproj +++ b/example/mac/macExample/macExample.xcodeproj/project.pbxproj @@ -11,7 +11,6 @@ C6BD2873170BC5C500A91AC1 /* MCOCIDURLProtocol.mm in Sources */ = {isa = PBXBuildFile; fileRef = C6BD2870170BC5C500A91AC1 /* MCOCIDURLProtocol.mm */; }; C6BD2874170BC5C500A91AC1 /* MCOMessageView.mm in Sources */ = {isa = PBXBuildFile; fileRef = C6BD2872170BC5C500A91AC1 /* MCOMessageView.mm */; }; C6BD28B4170BDFE500A91AC1 /* MailCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C6BD28B3170BDFE500A91AC1 /* MailCore.framework */; }; - C6BD28BA170C14C300A91AC1 /* MCTApplication.mm in Sources */ = {isa = PBXBuildFile; fileRef = C6BD28B9170C14C300A91AC1 /* MCTApplication.mm */; }; C6D42BB616ABB39A002BB4F9 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C6D42BB516ABB39A002BB4F9 /* Cocoa.framework */; }; C6D42BC916ABB39A002BB4F9 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C6D42BC816ABB39A002BB4F9 /* AppDelegate.m */; }; C6D42BCC16ABB39A002BB4F9 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = C6D42BCA16ABB39A002BB4F9 /* MainMenu.xib */; }; @@ -72,8 +71,6 @@ C6BD2871170BC5C500A91AC1 /* MCOMessageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCOMessageView.h; sourceTree = "<group>"; }; C6BD2872170BC5C500A91AC1 /* MCOMessageView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MCOMessageView.mm; sourceTree = "<group>"; }; C6BD2877170BC8ED00A91AC1 /* mailcore2.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = mailcore2.xcodeproj; path = "../../../build-mac/mailcore2.xcodeproj"; sourceTree = "<group>"; }; - C6BD28B8170C14C300A91AC1 /* MCTApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCTApplication.h; sourceTree = "<group>"; }; - C6BD28B9170C14C300A91AC1 /* MCTApplication.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MCTApplication.mm; sourceTree = "<group>"; }; C6D42BB116ABB39A002BB4F9 /* macExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = macExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; C6D42BB516ABB39A002BB4F9 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; C6D42BB816ABB39A002BB4F9 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; @@ -202,8 +199,6 @@ C6D42BE816ACF711002BB4F9 /* MCTMsgListViewController.m */, C6D42BEA16ACFE3F002BB4F9 /* MCTMsgViewController.h */, C6D42BEB16ACFE3F002BB4F9 /* MCTMsgViewController.m */, - C6BD28B8170C14C300A91AC1 /* MCTApplication.h */, - C6BD28B9170C14C300A91AC1 /* MCTApplication.mm */, ); path = macExample; sourceTree = "<group>"; @@ -330,7 +325,6 @@ C64FF38416AF97F400F8C162 /* main.mm in Sources */, C6BD2873170BC5C500A91AC1 /* MCOCIDURLProtocol.mm in Sources */, C6BD2874170BC5C500A91AC1 /* MCOMessageView.mm in Sources */, - C6BD28BA170C14C300A91AC1 /* MCTApplication.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/example/mac/macExample/macExample/MCTApplication.h b/example/mac/macExample/macExample/MCTApplication.h deleted file mode 100644 index a919bc90..00000000 --- a/example/mac/macExample/macExample/MCTApplication.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// MCTApplication.h -// macExample -// -// Created by DINH Viêt Hoà on 4/3/13. -// Copyright (c) 2013 MailCore. All rights reserved. -// - -#import <Cocoa/Cocoa.h> - -@interface MCTApplication : NSApplication - -@end diff --git a/example/mac/macExample/macExample/MCTApplication.mm b/example/mac/macExample/macExample/MCTApplication.mm deleted file mode 100644 index f2c4c597..00000000 --- a/example/mac/macExample/macExample/MCTApplication.mm +++ /dev/null @@ -1,22 +0,0 @@ -// -// MCTApplication.m -// macExample -// -// Created by DINH Viêt Hoà on 4/3/13. -// Copyright (c) 2013 MailCore. All rights reserved. -// - -#import "MCTApplication.h" - -#import <mailcore/mailcore.h> - -@implementation MCTApplication - -- (void) sendEvent:(NSEvent *)theEvent -{ - mailcore::AutoreleasePool * pool = new mailcore::AutoreleasePool(); - [super sendEvent:theEvent]; - pool->release(); -} - -@end diff --git a/example/mac/macExample/macExample/macExample-Info.plist b/example/mac/macExample/macExample/macExample-Info.plist index cfc74c76..39e003f6 100644 --- a/example/mac/macExample/macExample/macExample-Info.plist +++ b/example/mac/macExample/macExample/macExample-Info.plist @@ -29,6 +29,6 @@ <key>NSMainNibFile</key> <string>MainMenu</string> <key>NSPrincipalClass</key> - <string>MCTApplication</string> + <string>NSApplication</string> </dict> </plist> diff --git a/example/mac/macExample/macExample/main.mm b/example/mac/macExample/macExample/main.mm index 9572234a..cdb19817 100644 --- a/example/mac/macExample/macExample/main.mm +++ b/example/mac/macExample/macExample/main.mm @@ -13,7 +13,7 @@ int main(int argc, char *argv[]) { u_setDataDirectory("/usr/local/share/icu"); - mailcore::AutoreleasePool * pool = new mailcore::AutoreleasePool(); + //mailcore::AutoreleasePool * pool = new mailcore::AutoreleasePool(); return NSApplicationMain(argc, (const char **)argv); - pool->release(); + //pool->release(); } |