new、delete、new[] 与 delete[] | C++

本章覆盖:dynamic allocation;`new`;`delete`;`new[]`;`delete[]`;constructor / destructor;allocation failure;mismatched delete;memory leak;exception safety;普通业务代码应优先 RAII / smart pointer / container,而不是直接 new/delete。

本章知识点

  • dynamic allocation
  • new
  • delete
  • new[]
  • delete[]
  • constructor / destructor
  • allocation failure
  • mismatched delete
  • memory leak
  • exception safety
  • 普通业务代码应优先 RAII / smart pointer / container,而不是直接 new/delete