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