Smart pointers — automatic memory management.
1#include <memory>2 3auto uptr = std::make_unique<int>(10);4auto sptr = std::make_shared<int>(20);
unique_ptr
shared_ptr
weak_ptr