equal
deleted
inserted
replaced
147 } |
147 } |
148 } |
148 } |
149 |
149 |
150 int main(int argc, char *argv[]) |
150 int main(int argc, char *argv[]) |
151 { |
151 { |
|
152 // Since we're calling this first, closeResources() will be the last thing called after main() returns. |
|
153 atexit(closeResources); |
|
154 |
152 #ifdef __APPLE__ |
155 #ifdef __APPLE__ |
153 // This creates the autoreleasepool that prevents leaking, and destroys it only on exit |
156 cocoaInit = new CocoaInitializer(); // Creates the autoreleasepool preventing cocoa object leaks on OS X. |
154 cocoaInit = new CocoaInitializer(); |
|
155 atexit(closeResources); |
|
156 #endif |
157 #endif |
157 |
158 |
158 #ifndef _WIN32 |
159 #ifndef _WIN32 |
159 signal(SIGINT, &terminateFrontend); |
160 signal(SIGINT, &terminateFrontend); |
160 #endif |
161 #endif |