advanced memory management techniques in Rust