(C++) shared_ptr
shared_ptr is a type of smart pointer that can be copied safely and cheap, without copying the object pointed to. When the last shared_ptr using an object goes out of scope, it will delete the object pointedto.
There are multiple types of shared_ptrs: