#Issue in book I am reading

4 messages · Page 1 of 1 (latest)

low dew
#

How does this make sense:

If the reference can’t live at least as long as the variable does, then at some point r will be a dangling pointer. We say that the reference’s lifetime must contain or enclose the variable’s.

Shouldn't it be:

If the reference can’t live at least as long as the variable does, then at some point r will be a dangling pointer. We say that the variable’s lifetime must contain or enclose the reference’s.

upper cove
#

that correction seems right to me

#

also "If the variable can’t live at least as long as the reference does," would sound better to me

low dew
#

yeah, I assume the guy made a mistake lmao