Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Weak references turning nil is perfectly expected.

But you should never access a weak reference. When you need to access a weak reference, you should attempt to take a strong reference. That will either fail, and should be handled, or will succeed, and then will not be nil, and won't 'turn nil'.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: