Skip to content

Commit

Permalink
Update NSObject+SmartBlock.m
Browse files Browse the repository at this point in the history
  • Loading branch information
qinzhiwei committed Apr 24, 2019
1 parent 75d78c1 commit d2c7a16
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions SmartBlock/SmartBlock/NSObject+SmartBlock.m
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ - (void)observeCallBackUsingKey:(NSString *)key callBack:(id)block destructionOp
initialized = YES;
}

#warning fix me!!!可能存在通过内存地址访问对象,可能会因对象释放而出现bad_access导致程序直接挂掉,目前只是内存地址比对,没有访问内存指针,所以暂时不会存在问题。
NSString *address = [NSString stringWithFormat:@"%p",self];

id associatedObj = objc_getAssociatedObject(self, &kAssociatedObjectKey);
Expand Down

0 comments on commit d2c7a16

Please sign in to comment.