I am new to C++ programming but have a solid background in C#, Java and PHP. I see in C++ there are multiple ways to allocate and free data and I understand that when you call malloc you should call free and when you use the new operator you should pair with delete and it is a mistake to mix the two (eg. calling free() on something that was created with the new operator), but I'm not clear on when I should use malloc/free and when I should use new/delete in my real world programs.
If anyone is a C++ expert, please let me know any rules of thumb or conventions you follow in this regard.