std::unique_ptr:独占所有权 | C++

本章覆盖:`std::unique_ptr`;exclusive ownership;move-only;`make_unique`;automatic cleanup;custom deleter;array specialization 的边界;function return;ownership transfer;raw pointer observer;首选默认动态所有权模型。

本章知识点

  • std::unique_ptr
  • exclusive ownership
  • move-only
  • make_unique
  • automatic cleanup
  • custom deleter
  • array specialization 的边界
  • function return
  • ownership transfer
  • raw pointer observer
  • 首选默认动态所有权模型