Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shakesVan opened this issue Mar 30, 2020 · 0 comments
Open

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

shakesVan opened this issue Mar 30, 2020 · 0 comments

Comments

@shakesVan
Copy link
Member

😊:

- (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:

大佬说得太对了


😊:

会过度释放


😊:

然后就崩溃了


😊:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant