3 ms·
I think it's important to note that Rust can still leak memory in safe code. Memory leaks are not "unsafe"; they're a performance issue and could possibly lead
by saghm 4y ago
I think it's important to note that Rust can still leak memory in safe code. Memory leaks are not "unsafe"; they're a performance issue and could possibly lead to panics due to running out of memory, but panicking is not unsafe (i.e. it's deterministic and not a source of undefined behavior). Rust provides a lot of absolutely critical guarantees, and I fully agree that it's much safer than C++, but I think it's important not to overstate the benefits (not that you did say that Rust prevents memory leaks, but I worry that someone might incorrectly infer that due to the way it was mentioned for C++).