QTfrontend/main.cpp
changeset 8406 8a834943609d
parent 8405 becac012d502
child 8508 f849b7b3af1d
equal deleted inserted replaced
8405:becac012d502 8406:8a834943609d
   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