Created
September 18, 2011 08:03
-
-
Save allending/1224866 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
- (void)testBlock { | |
NSMutableArray *array = [[NSMutableArray alloc] initWithObjects:@"foo", @"bar", nil]; | |
void(^block)(void) = ^{ | |
// probably dies in here | |
[array addObject:@"bomb"]; | |
[array removeObject:@"bomb"]; | |
}; | |
// block retains array? | |
[array release]; | |
block(); | |
// block still in scope | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment