Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <Foundation/Foundation.h>
- int main (int argc, char * argv[])
- {
- NSObject *captureObject = [NSObject new];
- NSLog(@"Before block: %lu", [captureObject retainCount]);
- void (^block)() = ^{
- NSLog(@"Inside block: %lu", [captureObject retainCount]);
- };
- NSLog(@"After block creation: %lu", [captureObject retainCount]);
- block();
- NSLog(@"After block call: %lu", [captureObject retainCount]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement