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" (EDIT: and it's called from "FreeObject" method inside the dll), that's not the problem.
Am i missing something? Is there another way to delete my object through interface?
EDIT: Again, i don't have memory management inconsistency, it's all inside dll. But right destructor just don't start.