diff --git a/test/Register/classlist.h b/test/Register/classlist.h index 97c3801..45233a3 100755 --- a/test/Register/classlist.h +++ b/test/Register/classlist.h @@ -22,6 +22,7 @@ struct Base { virtual void foo() = 0; + virtual ~Base(); }; bool registerClass(std::string, Base*(*)() ); diff --git a/test/Register/foo.cpp b/test/Register/foo.cpp index 1721f86..2d8be0f 100755 --- a/test/Register/foo.cpp +++ b/test/Register/foo.cpp @@ -15,9 +15,16 @@ #include "foo.h" #include +Base::~Base(){} + Foo::Foo(){} Boo::Boo(){} + +Foo::~Foo(){} +Boo::~Boo(){} + + void Foo::foo(){std::cout << "Foo::foo() called, this: " << this << "\n"; } void Boo::foo(){std::cout << "Boo::foo() called, this: " << this << "\n"; } diff --git a/test/Register/foo.h b/test/Register/foo.h index 01ce401..c910854 100755 --- a/test/Register/foo.h +++ b/test/Register/foo.h @@ -20,12 +20,14 @@ struct Foo : Base { Foo(); + virtual ~Foo(); void foo(); }; struct Boo : Base { Boo(); + virtual ~Boo(); void foo(); };