- Example
As compared to the std::shared_ptr, std::weak_ptr does not change the reference counter of the shared variable. Let's take a look at this feature in the example below.
As compared to the std::shared_ptr, std::weak_ptr does not change the reference counter of the shared variable. Let's take a look at this feature in the example below.