Why isn’t my weak reference cleared right after the strong ones are gone?
问题 I am a little bit stubborn, but I want to understand weak and strong references well, so that\'s why I\'m asking you once again. Consider this: __weak NSString* mySecondPointer = myText; NSLog(@\"myText: %@\", myText); The result is myText: (null) and it is pretty obvious - weak reference is set to null just after assignment, cause there is no strong reference to the pointed object. But in this case: __strong NSString* strongPtr = [[NSString alloc] initWithFormat:@\"mYTeSTteXt %d\"]; // weak