Created
December 31, 2013 22:10
-
-
Save rnapier/8202731 to your computer and use it in GitHub Desktop.
Demonstrates that structs are not initialized under ARC. Run in Release.
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
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
struct Stuff { | |
int x; | |
int y; | |
}; | |
int x; | |
struct Stuff s; | |
printf("%d:%d\n", x, s.y); | |
} | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment