Files
developer-roadmap/roadmaps/cpp/content/shared_ptr@b5jZIZD_U_CPg-_bdndjz.md
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

440 B

shared_ptr

shared_ptr is a smart pointer in C++ that manages dynamically allocated memory. It enables multiple pointers to safely own and share the same object. When the last shared_ptr pointing to an object goes out of scope, the managed object is automatically deleted, preventing memory leaks. It achieves this by maintaining a reference count that tracks the number of shared_ptr instances pointing to the same memory location.