~/talk

Back to Basics: Smart Pointers

Talkat CppCon 2020 · 2020-09-14..09-18
slides:none on file

Covers C++ smart pointers (std::unique_ptr, std::shared_ptr, std::weak_ptr and the removed std::auto_ptr), explaining their distinct ownership semantics and intended purposes. Discusses how to choose which smart pointer to use for function parameters (raw pointer vs unique_ptr vs shared_ptr; by value or reference; const or not) and for factory return types, with emphasis on understanding ownership rather than treating them as mere pointer wrappers.

AI-written summary · about

  1. 0:00Start
  2. 7:22Overview
  3. 20:31std::shared_ptr
  4. 35:36std:: weak ptr
  5. 40:54Cyclic References
  6. 44:53Performance Comparison
  7. 49:45Concurrency
  8. 51:30Atomic Smart Pointers
  9. 52:02Functions
  10. 58:55Smart Pointer as Parameter
~/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.