~/talk

Back to Basics: Lifetime Management in Cpp

slides:none on file

Explains that the concrete claim is: prefer Rule of 0 (use existing value types and managers) and only implement special members when managing resources, which then typically forces the Rule of 5. Demonstrates building a Widget/Gadget that starts with a raw pointer, forces writing copy ctor/assign/dtor, then adds move ctor/assign, uses std::swap and std::exchange and marks moves noexcept, and finally replaces raw memory with unique_ptr — each step compiles and runtime logs show constructors and destructors behaving as expected.

AI-written summary · about

  1. 0:00Lifetime management intro
  2. 4:03Value types in C++
  3. 8:24Gadget class and default constructors
  4. 15:16Resource management with raw pointers
  5. 22:44Rule of three for resources
  6. 27:24Move semantics and rule of five
  7. 34:48Rule of zero with managers
  8. 39:47Type categorization for resources
  9. 42:58Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.