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 | 1403 | November 14, 2020 | |
Lifetimes: Documentation | 14 | 882 | January 12, 2023 | |
Impact of sloppy reference lifetimes | 10 | 521 | November 27, 2020 | |
Blog series: Lockout: Advanced aspects of lifetimes (part 5!)
|
32 | 4572 | January 12, 2023 | |
Bug in the borrow-checker?
|
5 | 145 | July 6, 2025 |