It's important to understand that lifetimes are descriptive not prescriptive. That is, you cannot extend how long something lives with a lifetime. So leaking memory in this way, or freeing it too late, is impossible.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Lifetimes and no memory corruption guarantees
|
5 | 1390 | November 14, 2020 | |
Lifetimes: Documentation | 14 | 851 | January 12, 2023 | |
Impact of sloppy reference lifetimes | 10 | 517 | November 27, 2020 | |
Blog series: Lockout: Advanced aspects of lifetimes (part 5!)
|
32 | 4482 | January 12, 2023 | |
Blog post: Common Rust Lifetime Misconceptions | 16 | 5178 | September 26, 2020 |