Friday-QA icon indicating copy to clipboard operation
Friday-QA copied to clipboard

dealloc中使用weak_self会出现什么结果

Open shakesVan opened this issue 4 years ago • 0 comments

😊:

- (void)dealloc{
    __weak __typeof(self) weak_self = self;
    NSLog(@"%@",weak_self);
}

会出现什么结果


SAGESSE:

nil


明天见:

懵逼


嗨,胡小桶 CIUM:

实验了下,炸了


SAGESSE:

好吧


五子棋:

weak_register_no_lock 就搜这个runtime方法就行了 这crash我查过


此刻柳暗花明:

五子棋大佬说得太对了


明天见:


明天见:

我在看10年前的文档


林小达:

这个crash我也查过,检测到self==nil的时候直接abort好像是


SAGESSE:

大佬说得太对了


😊:

会过度释放


😊:

然后就崩溃了


😊:

shakesVan avatar Mar 30 '20 08:03 shakesVan