Last active
August 29, 2015 14:03
-
-
Save bjhomer/bdd2f09ed0b82820058f 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
// Does this code create 10000 live instances of MyObj before returning? | |
// Or will each one be released on the following iteration? | |
void foo() { | |
NSLog(@"Starting!"); | |
int i=0; | |
start: | |
id obj = [MyObj new]; | |
if (++i<10000) { | |
goto start; | |
} | |
NSLog(@"done with obj: %@", obj); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment