Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Back to Basics: RAII in C++ - Lecture

CppCon via YouTube

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

Reviews

Start your review of Back to Basics: RAII in C++ - Lecture

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.