std - shared_ptr - T
Offered By: code::dive conference via YouTube
Course Description
Overview
Explore a comprehensive lecture from the code::dive 2016 conference focusing on std::shared_ptr in C++. Delve into the intricacies of C++ standard library smart pointers, RAII principles, and resource ownership. Examine problem statements, usage examples, and potential pitfalls of std::shared_ptr. Investigate thread safety considerations, mandatory synchronization, and idealistic implementations. Learn about custom deleters, allocator interfaces, type erasure, and Empty Base Optimization. Gain insights into the design overview, advantages of separate pointers, and the aliasing constructor. Enhance your understanding of C++ memory management and smart pointer usage through this in-depth presentation.
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
Related Courses
C++ in Detail: Common IdiomsUdemy Java: Generic Classes
LinkedIn Learning Generic Swift: Simplifying Protocols and Generics
ChariotSolutions via YouTube The Sincerest Form of Flattery - How Java & Scala are Imitating Functional Languages
GOTO Conferences via YouTube Breaking Dependencies - Type Erasure - The Implementation Details
NDC Conferences via YouTube