Contents Up << >>

Can I "free()" pointers allocated with "new"? Can I "delete" pointers allocated with "malloc()"?

No.

It is perfectly legal, moral, and wholesome to use malloc/ free and new/delete in the same program, but it is illegal, immoral, and despicable to free a pointer allocated via new, or to delete a pointer allocated via malloc.