3 ms·
... however, Rust's semantics specifically prevent this double free.
by steveklabnik 11y ago
... however, Rust's semantics specifically prevent this double free.
- AnimalMuppet 11y agoWhich, if we were talking about Rust here, might be relevant. But in this thread of the conversation, we're talking about C++ operator overloading and why you need it for deep copying on assignment. In the immediate context, how Rust does it is not relevant.
- dbaupp 11y agoThe discussio is about strategies to avoid the double-frees problem in a hypothetical "C++ with changes", and Rust's is one example. Seems fine and useful to give examples. (That's what Gankro's comment is too: Rust's strategy is affine types.)
- AnimalMuppet 11y agoCould be I missed something, but I looked all the way back to the root of this thread, and I didn't see (in any of the direct ancestors) anywhere where the topic was a hypothetical "C++ with changes".