class A { public: ~A() { std::cout << "A destroyed" << std::endl; } }; class B { public: A a; ~B() { s