aboutsummaryrefslogtreecommitdiffhomepage
path: root/example/mac/macExample/macExample
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-04-03 00:45:07 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-04-03 00:45:07 -0700
commitfd0bb4d4c1e82c8471d7b762df436fe67e3ef1a8 (patch)
treee7ccea6ef118025375eafc8883bedf8001fed917 /example/mac/macExample/macExample
parent5959cecab0a5be40588fb22dab465f6bc3fd721b (diff)
Added mailcore::AutoreleasePool on each event handler
Diffstat (limited to 'example/mac/macExample/macExample')
-rw-r--r--example/mac/macExample/macExample/MCTApplication.h13
-rw-r--r--example/mac/macExample/macExample/MCTApplication.mm22
-rw-r--r--example/mac/macExample/macExample/macExample-Info.plist2
3 files changed, 36 insertions, 1 deletions
diff --git a/example/mac/macExample/macExample/MCTApplication.h b/example/mac/macExample/macExample/MCTApplication.h
new file mode 100644
index 00000000..a919bc90
--- /dev/null
+++ b/example/mac/macExample/macExample/MCTApplication.h
@@ -0,0 +1,13 @@
+//
+// 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
new file mode 100644
index 00000000..f2c4c597
--- /dev/null
+++ b/example/mac/macExample/macExample/MCTApplication.mm
@@ -0,0 +1,22 @@
+//
+// 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 39e003f6..cfc74c76 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>NSApplication</string>
+ <string>MCTApplication</string>
</dict>
</plist>