summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools/Application/CocoaApplication.mm')
-rw-r--r--SwifTools/Application/CocoaApplication.mm24
1 files changed, 24 insertions, 0 deletions
diff --git a/SwifTools/Application/CocoaApplication.mm b/SwifTools/Application/CocoaApplication.mm
new file mode 100644
index 0000000..edfdc25
--- /dev/null
+++ b/SwifTools/Application/CocoaApplication.mm
@@ -0,0 +1,24 @@
+#include "SwifTools/Application/CocoaApplication.h"
+
+#include <AppKit/AppKit.h>
+#include <Cocoa/Cocoa.h>
+
+namespace Swift {
+
+class CocoaApplication::Private {
+ public:
+ NSAutoreleasePool* autoReleasePool_;
+};
+
+CocoaApplication::CocoaApplication() {
+ d = new CocoaApplication::Private();
+ NSApplicationLoad();
+ d->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
+}
+
+CocoaApplication::~CocoaApplication() {
+ [d->autoReleasePool_ release];
+ delete d;
+}
+
+}