add missing virtual destructors

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8874 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-02-23 07:08:11 +00:00
commit 3a27443cd8
3 changed files with 6 additions and 1 deletions

View file

@ -43,7 +43,7 @@ struct Foo5 : Foo4 {
}; };
struct Foo6 : Foo4 { struct Foo6 : Foo4 {
Foo6(const Foo6& ) { } Foo6(const Foo6& f) : Foo4(f) { }
}; };
struct Foo7 : Foo5 { struct Foo7 : Foo5 {

View file

@ -3,6 +3,7 @@
%inline %{ %inline %{
struct Base { struct Base {
Base() : MethodOrVariable(0) {} Base() : MethodOrVariable(0) {}
virtual ~Base() {}
protected: protected:
int MethodOrVariable; int MethodOrVariable;
}; };

View file

@ -19,6 +19,10 @@ namespace simuPOP
{ {
Pop m_pop; Pop m_pop;
Operator(int a):m_pop(a){} Operator(int a):m_pop(a){}
virtual ~Operator()
{
}
virtual int func() const virtual int func() const
{ return m_pop.m_a; } { return m_pop.m_a; }
}; };