Hacker News new | past | comments | ask | show | jobs | submit login

In a language with affine types (i.e. real move semantics, like Rust but not like C++), destroying this is safe. OTOH deleting, as in freeing memory under the assumption that it was allocated in a particular manner, is only safe if you can somehow enforce that it was allocated that way.



which you can by making the constructor private.




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

Search: