// File: bad7.cpp // // Testing where the destructor gets called. // Some things you are not supposed to do. #include #include "dmc.h" using namespace std ; int main() { DMC *ptr = new DMC ; cout << "Calling the destructor!\n" ; ptr->~DMC() ; // BAD! doesn't free memory cout << "done!\n" ; delete ptr ; }