Smart_ptr is the same as a normal pointer, but it provides safety via automatic memory.
It avoids dangling pointers, memory leaks, allocation failures etc.
The smart pointer must maintain a single reference count for all instances.
Smart_ptr is the same as a normal pointer, but it provides safety via automatic memory.
It avoids dangling pointers, memory leaks, allocation failures etc.
The smart pointer must maintain a single reference count for all instances.