8 virtual ~BaseClass() { }
11 class DerivedClass
: public BaseClass
15 virtual ~DerivedClass() { }
20 BaseClass::BaseClass()
24 DerivedClass::DerivedClass() : BaseClass()
30 main (int argc
, char **argv
)
32 BaseClass
*b
= nullptr; // Break here and check b has 0 children
33 b
= new DerivedClass(); // Break here and check b still has 0 children
34 b
= nullptr; // Break here and check b has one child now
35 return 0; // Break here and check b has 0 children again