Please also explain memory management in Rust and how lifetimes fit in to that, with examples.