Introduction
This section will deal which a very powerful new category called smart pointers. Let's begin.
Smart pointers are one of the most important additions to C++ because they empower you to implement explicit memory management in C++. Beside the deprecated std::auto_ptr
, C++ offers three different smart pointers. They are defined in the header <memory>
.
Firstly there is the std::unique_ptr
, which models the concept of exclusive ownership. Secondly, there is the std::shared_ptr
, who models the concept of ...