Differences between unique_ptr and shared_ptr
Both of these classes are smart pointers, which means that they automatically (in most cases) will deallocate the object that they point at when that object can no longer be referenced. The difference between the two is how many different pointers of each type can refer to a resource. When using unique_ptr, there can be at … Read more