📝Rust lifetimes are not about object creation/destruction but about how long the object is available at the given location

tags
Rust

This is one of the common Rust misconceptions. Rust lifetimes are not about object creation/destruction (lifetime?) but about how long the object is available at the given address.

The object might be moved out of its current location, but no destructors is called at this moment.

Backlinks