As the comment says, the result is that the behavior of the program is undefined.
If you have a "new" with a "free", your destructors are not called. This usually results in a memory and resource leak.
If you have "malloc" with "delete", you do not receive constructor calls, so your objects are not initialized. This can lead to all kinds of errors, for example. when the destructor is called.
As stated in a comment below, in Non-POD types (such as classes that have virtual methods and classes that use virtual inheritance) that need to be initialized, even if it is not immediately obvious that constructor initialization is required. If you are a malloc object, then call the virtual method, the most likely result will be a failure of your program.
Until now, if all of your POD types (Plain Old Data) are lucky, but it depends a lot on your compiler - there is no guarantee that "malloc" and "new" use the same heap, so you may get damaged heaps and crashes on some compilers.
In short - do not do this.
source share