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

As far as I understood the article, using references is a desaster waiting to happen as accessing the references once the original variables are out of scope is "undefined behaviour" - probably accessing random values on the stack if your reference was pointing to a variable on the stack


Not using references doesn't help you at all, you have to recursively make sure the lifetime of all the objects you use is greater than the lifetime of your closure.




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

Search: