Possible Duplicate:
malloc and delete in C++, opinions
Can a memory obtained using the 'malloc' function call be freed using 'delete'?
I tried a simple code using a very simple structure and it seems to be working fine. But, purify reports freeing mismatched memor开发者_开发技巧y.
If this is a problem, how big is the problem? If such mismatched freeing of memory exists in the code is it mandatory to fix it?
This might work on some platforms, but no you may not. It's not portable and it's an error.
精彩评论