fork download
  1. //#include <Cocoa/Cocoa.h>
  2. #include <iostream>
  3.  
  4. namespace {
  5. static class Initializer {
  6. public:
  7. Initializer() {
  8. std::cout << "foo\n";
  9. //pool = [[NSAutoreleasePool alloc] init];
  10. //[NSApplication sharedApplication];
  11. }
  12.  
  13. ~Initializer() {
  14. std::cout << "bar\n";
  15. //[pool release];
  16. }
  17.  
  18. //NSAutoreleasePool *pool;
  19. } initializer;
  20. }
  21.  
  22. int main() {}
  23.  
Success #stdin #stdout 0s 2828KB
stdin
Standard input is empty
stdout
foo
bar