QTfrontend/CocoaInitializer.mm
author nemo
Fri, 24 Jul 2009 16:43:19 +0000
changeset 2271 ca0754f0f42b
parent 2261 57e99c908e7c
child 2400 2422ea85d100
permissions -rw-r--r--
flagging for "reduced quality". Clamping cuts frame rate in half in software rendering on my sucky laptop

/*
 * 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;
}