On Monday, 21 September 2015 at 11:01:27 UTC, ZombineDev wrote:
There's also a simple thing called smart pointers which do this with RAII, copy and move semantics. Smart pointers manage the lifetime of the object they point to automatically. You just need to make sure that you access the object only through the smart pointer, because if you get another reference (through other means) that the smart pointer doesn't know about, the smart pointer may free the object too early.
My understanding is that the key benefit of Rust's system is that compile time checks don't have the runtime costs of smart pointers.