MENU

Fun & Interesting

std::shared_ptr - A reference counted smart pointer | Modern Cpp Series Ep. 34

Mike Shah 11,396 3 years ago
Video Not Working? Fix It Now

►Full C++ Series Playlist: https://www.youtube.com/playlist?list=PLvv0ScY6vfd8j-tlhYVPYgiIyXduu6m-L ►Find full courses on: https://courses.mshah.io/ ►Join as Member to Support the channel: https://www.youtube.com/channel/UCA64pZbN5Mz5NxC3SO4qpDg/join ►Lesson Description: In this lesson I show you how to use a std::shared_ptr. Shared pointers are the second of three types of smart pointers introduced in C++. They are a wrapper around raw pointers, that allow you to ensure that a resource stays alive while an object points to it. The mechanism for this is by using reference counting, and a special 'control block' does the book keeping for your smart pointers. ►YouTube Channel: https://www.youtube.com/c/MikeShah ►Please like and subscribe to help the channel!

Comment