unique_ptrdoes not (should not) have any overhead during operation compared to using raw pointers. shared_ptrhas some memory and time overhead (how much is implementation dependent). The practical overhead here can easily be zero if you really need something that behaves like shared_ptr(that is, no other implementation that you think of would be faster or more RAM).
This does not mean that you will never use the new / delete in your code, but it is not what you will do all the time.
Cubic source
share