Only if you have implemented your destructors correctly. Forgot to add a 'virtual' on one of them? Too bad. Have some pointers to objects? Better remember
to call delete on them all. You never really 'know' things are destroyed, that's why tools like Valgrind exist.
The real fun is really the combination with exceptions and destructors. So much so, some projects essentially ban exceptions in C++ code.
The real fun is really the combination with exceptions and destructors. So much so, some projects essentially ban exceptions in C++ code.