From f670bea44897af5642e6bd37800d56b926dcd13c Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Thu, 23 Feb 2006 07:08:11 +0000 Subject: [PATCH] add missing virtual destructors git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8874 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/constructor_copy.i | 2 +- Examples/test-suite/inherit_same_name.i | 1 + Examples/test-suite/python/simutry.i | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Examples/test-suite/constructor_copy.i b/Examples/test-suite/constructor_copy.i index 523f911de..16081bad3 100644 --- a/Examples/test-suite/constructor_copy.i +++ b/Examples/test-suite/constructor_copy.i @@ -43,7 +43,7 @@ struct Foo5 : Foo4 { }; struct Foo6 : Foo4 { - Foo6(const Foo6& ) { } + Foo6(const Foo6& f) : Foo4(f) { } }; struct Foo7 : Foo5 { diff --git a/Examples/test-suite/inherit_same_name.i b/Examples/test-suite/inherit_same_name.i index 226c459a7..e50d064ad 100644 --- a/Examples/test-suite/inherit_same_name.i +++ b/Examples/test-suite/inherit_same_name.i @@ -3,6 +3,7 @@ %inline %{ struct Base { Base() : MethodOrVariable(0) {} + virtual ~Base() {} protected: int MethodOrVariable; }; diff --git a/Examples/test-suite/python/simutry.i b/Examples/test-suite/python/simutry.i index cf9bdd3c4..addea14db 100644 --- a/Examples/test-suite/python/simutry.i +++ b/Examples/test-suite/python/simutry.i @@ -19,6 +19,10 @@ namespace simuPOP { Pop m_pop; Operator(int a):m_pop(a){} + virtual ~Operator() + { + } + virtual int func() const { return m_pop.m_a; } };