c/C++ dynamic memory - compatible?

If I have a function in a library that uses malloc, is it acceptable for me to use delete to free it? Not sure things happen like that, but still...
Probably not, malloc/free don't invoke the ctor/dtor while new/delete do.
malloc is guaranteed to never call new, and delete is only guaranteed to work with pointers obtained from new. So, no.
Topic archived. No new replies allowed.