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

C++ destructors are deterministic. Relying on a nondeterministic GC call to run __del__ is not good code.

Also worth noting that the Python spec does not say __del__ must be called, only that it may be called after all references are deleted. So, no, you can't tie it to __del__.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: