Overview
Syllabus
Intro
WHY DO WE USE C++?
C++ STANDARD LIBRARY SMART POINTERS
RAII (RESOURCE ACQUISITION IS INITIALIZATION)
RESOURCE OWNERSHIP
PROBLEM STATEMENT
SIMPLE USAGE EXAMPLE
std::shared_ptr - INCORRECT APPROACH
std::shared_ptr - IDEALISTIC APPROACH
IS std::shared_ptr THREAD-SAFE?
MANDATORY SYNCHRONIZATION
IDEALISTIC IMPLEMENTATION
HERB SUTTER'S FAVORITE C++ 10-LINER
std::shared_ptr CONSTRUCTION
CUSTOM DELETER INTERFACE
CUSTOM ALLOCATOR INTERFACE
ALLOCATOR TRAITS
TYPE ERASURE
EMPTY BASE OPTIMIZATION (EBO)
DESIGN OVERVIEW
ADVANTAGES OF HAVING 2 SEPARATE POINTERS
ALIASING CONSTRUCTOR
Taught by
code::dive conference