Difference between malloc() and operator new.
Answers
Answered by
1
The most relevant difference is that the new operator allocates memory then calls the constructor, and delete calls the destructor then deallocates the memory. new calls the ctor of the object, delete call the dtor. malloc & free just allocate and release raw memory
Similar questions