Pure virtual destructor in interface
- by ALOR
Hello all.
Here is my problem. I'm making C++ dll, which extensively relies on instance object exports.
So i return my actual instances as a pointers to interface through some exported factory method.
Interfaces i use are purely virtual, to avoid linking problame. So i need a pure virtual destructor too, and i implemented one (with empty body, as i googled it).
All compiles perfectly well, except... I can't see, if the actual destructors are called or not - because when i added some std::cout << "hello destructor"; i never get to see it.
I have some explicit "delete obj", that's not the problem.
Am i missing something? Is there another way to delete my object through interface?