Lifetimes of References
There’s an important restriction on references, both mutable and immutable, they cannot live longer than the values they are referencing. Let’s look at an example:
There’s an important restriction on references, both mutable and immutable, they cannot live longer than the values they are referencing. Let’s look at an example: