3 ms·
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 a
by amluto 3y ago
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.
- mgaunard 3y agowhich you can by making the constructor private.