Smart Pointers: Weak Pointers
std::weak_ptr is the last component of the smart pointers family. Its purpose is limited compared to the other smart pointer, and we will examine why in this lesson.
We'll cover the following
Introduction
To be honest, std::weak_ptr is not a classic smart pointer. std::weak_ptr
supports no transparent access to the resource as it only borrows the resource from a std::shared_ptr
.
Create a free account to view this lesson.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy