Skip to content

Glossary: C++ Beyond the Basics

Unique pointer

Also written: std::unique_ptr, unique_ptr, std::make_unique

`std::unique_ptr` is the single owner of a heap object and deletes it in its destructor. It is move-only, so `std::move` transfers ownership.

Where the book teaches it

Related terms

OwnershipMove-onlyShared pointerFactory function