Difference between revisions of "cpp/memory/new"
From cppreference.com
m (Text replace - "/sidebar" to "/navbar") |
m (r2.7.3) (Robot: Adding de, es, fr, it, ja, pt, ru, zh) |
||
Line 20: | Line 20: | ||
{{dcl list template | cpp/memory/new/dcl list nothrow}} | {{dcl list template | cpp/memory/new/dcl list nothrow}} | ||
{{dcl list end}} | {{dcl list end}} | ||
+ | |||
+ | [[de:cpp/memory/new]] | ||
+ | [[es:cpp/memory/new]] | ||
+ | [[fr:cpp/memory/new]] | ||
+ | [[it:cpp/memory/new]] | ||
+ | [[ja:cpp/memory/new]] | ||
+ | [[pt:cpp/memory/new]] | ||
+ | [[ru:cpp/memory/new]] | ||
+ | [[zh:cpp/memory/new]] |
Revision as of 16:06, 2 November 2012
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>
.