Re:Chromium project finds that 70% of security defects are m...
by msla on Sunday May 24, 2020 @03:01AM
(#23289731)
The problem with memory management is a problem with lifetime management, which Rust reasons about in terms of ownership management, which it attempts to reason about statically, with help from the programmer. GC attempts to do the same thing, dynamically, with less help from the programmer.
Both of those methods still allow leaks, which is why Rust encourages RAII. [1] Are there other structured lifetimes we can get compilers to enforce for us, like they enforce certain invariants about flow control using control structures?
Both of those methods still allow leaks, which is why Rust encourages RAII. [1] Are there other structured lifetimes we can get compilers to enforce for us, like they enforce certain invariants about flow control using control structures?
[1] https://users.rust-lang.org/t/memory-leaks-in-rust/18187/2
http://huonw.github.io/blog/2016/04/memory-leaks-are-memory-...
https://doc.rust-lang.org/nomicon/leaking.html