QTfrontend/CocoaInitializer.mm
author unc0rr
Tue, 01 Sep 2009 17:46:13 +0000
changeset 2340 3b35fd5f67c7
parent 2261 57e99c908e7c
child 2400 2422ea85d100
permissions -rw-r--r--
Fix a bug when you are unable to do anything in lobby when room is closed during round

/*
 * Copyright (C) 2008 Remko Troncon
 */

#include "CocoaInitializer.h"

#include <AppKit/AppKit.h>
#include <Cocoa/Cocoa.h>
#include <QtDebug>

class CocoaInitializer::Private 
{
	public:
		NSAutoreleasePool* autoReleasePool_;
};

CocoaInitializer::CocoaInitializer()
{
	d = new CocoaInitializer::Private();
	NSApplicationLoad();
	d->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
}

CocoaInitializer::~CocoaInitializer()
{
	[d->autoReleasePool_ release];
	delete d;
}