mirror of https://github.com/swig/swig
add in missing virtual destructor
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9186 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5e638de46c
commit
da0f95ec8f
|
@ -12,6 +12,7 @@ public:
|
|||
};
|
||||
class Derived : private Base {
|
||||
public:
|
||||
virtual ~Derived() {}
|
||||
virtual void VirtualMethod() {}
|
||||
int variable;
|
||||
};
|
||||
|
|
|
@ -68,7 +68,7 @@ private:
|
|||
void delBase() { delete m_base; m_base = 0; }
|
||||
public:
|
||||
Caller(): m_base(0) {}
|
||||
~Caller() { delBase(); }
|
||||
virtual ~Caller() { delBase(); }
|
||||
void set(Base *b) { delBase(); m_base = b; }
|
||||
void reset() { m_base = 0; }
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ public:
|
|||
using Foo::defaulted;
|
||||
using Foo::virtualmethod;
|
||||
virtual void anothervirtual() {}
|
||||
virtual ~FooBar() {}
|
||||
};
|
||||
|
||||
%}
|
||||
|
|
Loading…
Reference in New Issue