iOS: Block property directly set crashes when accessed
Consider the following code: @interface ClassA : NSObject @property (nonatomic, copy) void(^blockCopy)(); @end @implementation ClassA @synthesize blockCopy; - (void)giveBlock:(void(^)())inBlock { blockCopy = inBlock; } @end Then use it in a class which has a strong property of type ClassA called someA : self.someA = [[ClassA alloc] init]; [self.someA giveBlock:^{ NSLog(@"self = %@", self); }]; dispatch_async(dispatch_get_main_queue(), ^{ self.someA.blockCopy(); self.someA = nil; }); If I run that built O3 with ARC enabled, on iOS, it crashes during the self.someA.blockCopy(); call inside objc