Tag: Lifetime
4 posts
-
Rust Ownership Debugging Case Study
Solve real Rust ownership, borrowing, and lifetime errors beginners hit: reading borrow checker messages, RefCell, Rc, Arc, and multithreaded.
-
C++ Temporary Objects: Lifetime, const&, RVO, and Pitfalls
When C++ creates temporaries, why they die at the end of the full expression, what const& extension covers, and the c_str, string_view and lock_guard traps.
-
C++ Object Lifetime: Storage Duration, RAII, and Dangling
C++ lifetime and storage duration: automatic, static, dynamic, thread_local; destruction order; temporaries; smart pointers and RAII.
-
C++ Dangling References: Lifetime and Temporaries
Dangling references in C++: returning references to locals, temporaries, container invalidation, lambdas, and fixes—values, smart pointers, ASan.