author | koda |
Sun, 16 Jan 2011 03:39:54 +0100 | |
branch | 0.9.14 |
changeset 4310 | 4613b178d45c |
parent 3697 | d5b30d6373fc |
child 5095 | 15dd764b728c |
permissions | -rw-r--r-- |
2261 | 1 |
/* |
2 |
* Copyright (C) 2008 Remko Troncon |
|
3 |
*/ |
|
4 |
||
5 |
#include "CocoaInitializer.h" |
|
6 |
||
7 |
#include <AppKit/AppKit.h> |
|
8 |
#include <Cocoa/Cocoa.h> |
|
9 |
#include <QtDebug> |
|
10 |
||
3697 | 11 |
class CocoaInitializer::Private |
2261 | 12 |
{ |
13 |
public: |
|
14 |
NSAutoreleasePool* autoReleasePool_; |
|
15 |
}; |
|
16 |
||
17 |
CocoaInitializer::CocoaInitializer() |
|
18 |
{ |
|
19 |
d = new CocoaInitializer::Private(); |
|
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
2261
diff
changeset
|
20 |
c = new CocoaInitializer::Private(); |
2261 | 21 |
NSApplicationLoad(); |
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
2261
diff
changeset
|
22 |
c->autoReleasePool_ = [[NSAutoreleasePool alloc] init]; |
2261 | 23 |
d->autoReleasePool_ = [[NSAutoreleasePool alloc] init]; |
24 |
} |
|
25 |
||
26 |
CocoaInitializer::~CocoaInitializer() |
|
27 |
{ |
|
28 |
[d->autoReleasePool_ release]; |
|
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
2261
diff
changeset
|
29 |
[c->autoReleasePool_ release]; |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
2261
diff
changeset
|
30 |
delete c; |
2261 | 31 |
delete d; |
32 |
} |