QTfrontend/CocoaInitializer.mm
author nemo
Wed, 08 Dec 2010 14:46:17 -0500
changeset 4491 dbd332f86dac
parent 3697 d5b30d6373fc
child 5095 15dd764b728c
permissions -rw-r--r--
pngcrush the new 2x previews. This "make the preview look a bit crisper at same size in iphone 4" is now costing us 2,916,716 bytes

/*
 * 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();
        c = new CocoaInitializer::Private();
	NSApplicationLoad();
        c->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
	d->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
}

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