3 ms·
Would using Rust have prevented this?
by archy_ 3y ago
Would using Rust have prevented this?
- steveklabnik 3y agoRust does not claim to prevent memory leaks.
- wongarsu 3y agoIt is true that Rust considers memory leaks safe. But Rust's type system still helps compared to C. The two toy examples in the article wouldn't have happened in idiomatic Rust. Though the same can be said about C++, or any other language preferring RAII over explicit free calls.