Files
developer-roadmap/roadmaps/cpp/content/unique_ptr@k9c5seRkhgm_yHPpiz2X0.md
T
Arik Chakma 274082fd77 feat: clean roadmap content and sync scripts (#10181)
* refactor: clean to roadmap content

* refactor: move shared helpers into scripts/lib
2026-07-28 05:45:17 +06:00

877 B
Raw Blame History

unique_ptr

unique_ptr is a smart pointer in C++ that provides exclusive ownership of a dynamically allocated object. It ensures that only one unique_ptr can point to a given object at any time, preventing memory leaks by automatically deleting the managed object when the unique_ptr goes out of scope or is explicitly reset. Ownership can be transferred to another unique_ptr using std::move, but copying is disallowed to enforce the single-ownership principle.

Visit the following resources to learn more: