Overview
Explore the RAII (Resource Acquisition is Initialization) idiom in C++ through this 44-minute conference talk from CppCon 2022. Delve into the power of RAII as a tool for guarding against resource mishandling, examine examples from the Standard Library, and consider design principles for creating your own RAII classes. Learn from Andre Kostur, a seasoned C++ developer with nearly 30 years of experience, as he covers topics ranging from memory management and common problems to object lifetimes, smart pointers, and core guidelines. Gain insights into resource loops, default acquisition, and object copyability while exploring various RAII implementations such as lock guards, unique pointers, and shared pointers.
Syllabus
Introduction
Agenda
Resource
Memory
Common Problems
Lock Mutex
Object Lifetimes
Lock Guard
Shared Pointer
Standed Unique Lock
Standed Thread
Resource loops
Unique pointer
Fopen and Fclose
Shared pointers
Default acquisition
Object copyable
Core guidelines
Questions
Taught by
CppCon