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
3 changed files with 3 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ public:
|
||||||
};
|
};
|
||||||
class Derived : private Base {
|
class Derived : private Base {
|
||||||
public:
|
public:
|
||||||
|
virtual ~Derived() {}
|
||||||
virtual void VirtualMethod() {}
|
virtual void VirtualMethod() {}
|
||||||
int variable;
|
int variable;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ private:
|
||||||
void delBase() { delete m_base; m_base = 0; }
|
void delBase() { delete m_base; m_base = 0; }
|
||||||
public:
|
public:
|
||||||
Caller(): m_base(0) {}
|
Caller(): m_base(0) {}
|
||||||
~Caller() { delBase(); }
|
virtual ~Caller() { delBase(); }
|
||||||
void set(Base *b) { delBase(); m_base = b; }
|
void set(Base *b) { delBase(); m_base = b; }
|
||||||
void reset() { m_base = 0; }
|
void reset() { m_base = 0; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ public:
|
||||||
using Foo::defaulted;
|
using Foo::defaulted;
|
||||||
using Foo::virtualmethod;
|
using Foo::virtualmethod;
|
||||||
virtual void anothervirtual() {}
|
virtual void anothervirtual() {}
|
||||||
|
virtual ~FooBar() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue