Weak property not zeroing using ARC
问题 I have the following simple code for an object that holds a weak reference: // interface @interface GMWeakRefObj : NSObject @property (weak) id object; @end // implementation @implementation GMWeakRefObj @synthesize object; @end When I run the following test code it fails on the second assert: NSData* d = [[NSData alloc] init]; GMWeakRefObj* weakRef = [[GMWeakRefObj alloc] init]; weakRef.object = d; NSAssert(weakRef.object != nil, @"Reference wasn't assigned"); d = nil; NSAssert(weakRef