Created
November 22, 2012 02:59
-
-
Save jcayzac/4129211 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| NSNumber* const XXX; | |
| __attribute__((constructor)) static void createConstants() { | |
| @autoreleasepool { | |
| *(NSNumber**)&XXX = [@1 retain]; | |
| } | |
| } | |
| __attribute__((destructor)) static void destroyConstants() { | |
| [XXX release]; | |
| } | |
| int main(int argc, char *argv[]) | |
| { | |
| @autoreleasepool { | |
| NSLog(@"XXX = %@", XXX); | |
| return 0; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment