My Object have some instance variable , like this:
@interface MyObject : NSObject
{
@private
NSDictionary * resultDictionary ;
}
this is the method :
- (void) doSomething
{
__weak typeof(self) weakSelf = self ;
[TaskAction invoke:^(NSDictionary* result){
if(result){
weakSelf->resultDictionary = result ; // dereferencing a weak pointer is not allowed due to possible null value caused by race condition , assign it to strong variable first ...
}
}]
}
the iOS compiler throw a Error : // dereferencing a weak pointer is not allowed due to possible null value caused by race condition , assign it to strong variable first ...
the error statement is :weakSelf->resultDictionary = result ;
Could you help me that why the mistake .