Top "New-operator" questions

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

C++ and when to use delete

I am re-reading some code from a while ago on C++ (I am learning Java in school right now), and …

c++ new-operator delete-operator
No matching function for call to operator new

I'm trying to wrap a class from a library I'm using in Lua. Specifially, I'm trying to wrap the color …

c++ new-operator
Performance cost of 'new' in C#?

In C# what is the performance cost of using the new keyword? I ask specifically in relation to games development, …

c# performance xna new-operator
C++ STL allocator vs operator new

According to C++ Primer 4th edition, page 755, there is a note saying: Modern C++ programs ordinarily ought to use the …

c++ memory stl new-operator allocator
How should I write ISO C++ Standard conformant custom new and delete operators?

How should I write ISO C++ standard conformant custom new and delete operators? This is in continuation of Overloading new …

c++ operator-overloading new-operator c++-faq delete-operator
If a struct is a value type why can I new it?

In C# structs are value types, but I am able to new them as if they are reference types. Why …

c# struct new-operator value-type
Is there any reason to choose __new__ over __init__ when defining a metaclass?

I've always set up metaclasses something like this: class SomeMetaClass(type): def __new__(cls, name, bases, dict): #do stuff here …

python constructor new-operator metaclass init
How much memory should you be able to allocate?

Background: I am writing a C++ program working with large amounts of geodata, and wish to load large chunks to …

c++ new-operator dynamic-memory-allocation
Why there is no placement delete expression in C++?

Why C++ hasn't placement delete that directly corresponds to the placement new, i.e. calls the destructor and calls appropriate …

c++ c++11 new-operator delete-operator
Override new operator in C++ while crtdbg.h is causing conflicts

While trying out some memory tracking and preparation for my own memory manager, I tried to override the new operator. …

c++ memory-management stl new-operator crtdbg.h