Описание тега new-operator

NoneNew is a language construct that dynamically allocates memory from free store and initialises the memory using the constructor.

Use this tag in conjunction with a language specific tag.

The new operator in C++

The C++ standard library provides several overloads of operator new and it can also be overloaded for your own classes.

Use this tag for questions about dynamic allocation in C++ and questions about overloading operator new. The placement-new tag may also be relevant for questions about constructing objects in existing memory.

Memory allocated with new must be de-allocated using delete C++ operator.

Wiki for New in C++

The new operator in other languages

The new operator is used in several other languages as well, including C#, Java, Javascript, and Perl. Use this tag for questions about memory allocation and instantiating objects in those languages.

Some highlighted questions about new-operator

  1. Why should C++ programmers minimize use of 'new'?
  2. /questions/11711162/est-li-v-skobkah-posle-imeni-tipa-raznitsa-s-novyim
  3. Passing arguments to C# generic new() of templated type
  4. Using "Object.create" instead of "new"
  5. Why does the use of 'new' cause memory leaks?
  6. C++ new int[0] -- will it allocate memory?
  7. https://stackru.com/questions/7149461/why-would-one-replace-default-new-and-delete-operators