►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::unique_ptr. I will show you why we might want to use this smart pointer versus a raw pointer, and how to create this pointer. While we haven't covered classes yet in this series, it's important to realize that this smart pointer is essentially a 'wrapper' around a raw pointer that calls the destructor to free memory when the pointer leaves scope. Note: Something not covered in this lesson is the idea of a 'custom deleter' which can be useful. ►YouTube Channel: https://www.youtube.com/c/MikeShah ►Please like and subscribe to help the channel!