author | mbait |
Sun, 28 Mar 2010 23:11:16 +0000 | |
changeset 3146 | 53ba22975536 |
parent 2400 | 2422ea85d100 |
child 3697 | d5b30d6373fc |
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 |
||
11 |
class CocoaInitializer::Private |
|
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 |
} |