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

Not if you have cascaded data structures, have some kind of destructor like operations to call, synchronize threads, or if the memory allocator does a call into the OS to release the memory back to the OS.


Two facts of computer science: Destructors suck. And destructors are wonderful.


I loved Herb Sutter's talk at CppCon 2016, where he showed how careless written destructors can lead to "stop-the-world" and stack overflows in complex data structures.




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

Search: