Q: What's the difference between new and malloc?
A: new is a keyword only present in C++, and is now the standard way (other than using Windows' memory allocation routines) to allocate memory. You should never use malloc within a C C++ application unless absolutely necessary. Because malloc is not designed for object-oriented features of C++, using it to allocate memory for classes will prevent the constructor of the class being called, as just one example of the problems that can arise. As a result of the problems that arise from the use of malloc and free, and because they are now for all intents and purposes obsolete, they are not discussed in any detail in this article, and I would discourage their use wherever possible.
Q: Can I use free and delete together?
A: You should free memory with the equivalent routine to that used to allocated it. For instance use free only on memory allocated with malloc, delete only on memory allocated with new and so on.