Share via


new

 

Briefly describes the uses of the new keyword and links to more information.

Title

Description

operator new (CRT)

Allocates a block of memory from the heap.

operator new (<new>)

The function that's called by a new-expression to allocate storage for individual objects.

new Operator (C++)

Allocates memory for an object or array of objects from the free store and returns a suitably typed, nonzero pointer to the object.

 new (new slot in vtable) (C++ Component Extensions)

In a C++/CLI project, indicates that a virtual member gets a new slot in the vtable. In other words, the function does not override a base class method.

 ref new, gcnew (C++ Component Extensions)

In a C++/CX (ref new) or C++/CLI (gcnew) project, this compound keyword creates a reference-counted object.