三张图解释为什么 std::shared_ptr 需要保存 weak_count

更正:图里面的shared_core在实现里面一般叫ref_count_base,是一个多态的东西

幻灯片1

幻灯片2

幻灯片3

原文地址:https://www.cnblogs.com/pointer-smq/p/8722164.html