I have a pointer to an object and I need to call delete operator only if the object was created on the heap. Is there any way to programmatically define this?

I'm using MFC in my app.

Thanks for your help.