Created
January 23, 2010 18:32
-
-
Save jorbsd/284725 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 jordan@thetourist /tmp > g++ -fobjc-gc-only -o test test.mm | |
test.mm: In function ‘int main(int, char**)’: | |
test.mm:4: error: ‘objc_collectingEnabled’ was not declared in this scope | |
test.mm:5: error: ‘objc_startCollectorThread’ was not declared in this scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
int main(int argc, char *argv[]) { | |
if (objc_collectingEnabled()) { | |
objc_startCollectorThread(); | |
} | |
NSAutoreleasePool *mainPool = [[NSAutoreleasePool alloc] init]; | |
[mainPool drain]; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment