Smart Pointers
The C++11 standard introduced two new smart pointers, unique_ptr and shared_ptr. These new classes are very helpful for managing dynamically allocated memory. The difference between these two smart pointers is that unique_ptr implies exclusive ownership to a block of memory, whereas shared_ptr allows for multiple ownership. Both these smart pointers are defined in the memory … Read more