cpp / latest / memory / new.html /

Low level memory management

The new-expression is the only way to create an object or an array of objects with dynamic storage duration, that is, with lifetime not restricted to the scope in which it is created. A new-expression obtains storage by calling an allocation function. A delete-expression destroys a most derived object or an array created by a new-expression and calls the deallocation function. The default allocation and deallocation functions, along with related functions, types, and objects, are declared in the header <new>.

Defined in header <new>
Functions
allocation functions
(function)
deallocation functions
(function)
(C++11)
obtains the current new handler
(function)
registers a new handler
(function)
Classes
exception thrown when memory allocation fails
(class)
(C++11)
exception thrown on allocation of array with invalid length
(class)
(C++17)
type used to pass alignment to alignment-aware allocation and deallocation functions
(enum)
Types
function pointer type of the new handler
(typedef)
Objects
an object of type nothrow_t used to select an non-throwing allocation function
(constant)
(C++20)
an object of type destroying_delete_t used to select destroying-delete overloads of operator delete
(class)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/memory/new