unique_ptr “owns” the object to which it points. Unlike
shared_ptr, only one
unique_ptr at a time can point to a given object. The object to which a
unique_ptr points is destroyed when the
unique_ptr is destroyed. Table 12.4 lists the operations specific to
unique_ptrs. The operations common to both were covered in Table 12.1 (p. 452).
shared_ptr, there is no library function comparable to
make_shared that returns a
unique_ptr. Instead, when we define ...