Last Updated: June 6, 2026
The previous lesson introduced the new/delete mechanics: int* p = new int(5); delete p; allocates and frees one int on the heap. This chapter goes a layer deeper. It splits the new expression into its two real steps (allocation and construction), shows the corresponding split for delete, covers what happens when allocation fails, explains why mismatching new[] with delete is a serious bug, and looks at the exception-safety guarantees that new provides automatically.