July 2020
Beginner
301 pages
3h 36m
English
Smart pointers are pointers that own the object they point to and automatically destroy the object they point to and deallocate the memory once the pointers go out of scope. This way, we do not have to manually delete the object like it was the case with the new and delete operators.
Smart pointers are declared in the <memory> header. We will cover the following smart pointers – unique and shared.