__weak __typeof(self)weakSelf = self;
_xBlock = ^() {
__strong __typeof(weakSelf)strongSelf = weakSelf;
[strongSelf doSomething];
[strongSelf doOtherthing];
};
_xBlock();
如果xBlock执行时,self已经被释放那么weakSelf为nil,strongSelf也为nil。
所以strongSelf只能保证当weakSelf有值的情况下,之后self不会被释放。
老师请问这么理解对么?