Weak Pointers
This is the last component of the smart pointer family. Its purpose is much more limited compared to the others.
To be honest, std::weak_ptr is not a smart pointer. std::weak_ptr
supports no transparent access to the resource because it only borrows the resource from a std::shared_ptr
. std::weak_ptr
does not change the reference counter:
Get hands-on with 1400+ tech skills courses.