std::weak_ptr 与循环引用 | C++

本章覆盖:`std::weak_ptr`;non-owning observation;`lock()`;expired;shared_ptr cycle;parent / child graph;callback registration;cache;ownership graph;weak_ptr 解决的是共享所有权图中的非 owning edge。

本章知识点

  • std::weak_ptr
  • non-owning observation
  • lock()
  • expired
  • shared_ptr cycle
  • parent / child graph
  • callback registration
  • cache
  • ownership graph
  • weak_ptr 解决的是共享所有权图中的非 owning edge