/trunk/Examples/test-suite/virtual_destructor.i
Swig | 22 lines | 12 code | 4 blank | 6 comment | 0 complexity | ae6ba8f7454ca601f0d90b779d1a4f5f MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- /*
- This testcase checks that a virtual destructor with void as a parameter is
- correctly handled.
- Also tests a class with protected destructor derived from a class with a
- public destructor.
- */
- %module virtual_destructor
- %inline %{
- class VirtualVoidDestructor {
- public:
- VirtualVoidDestructor() {};
- virtual ~VirtualVoidDestructor(void) { };
- };
- class Derived : public VirtualVoidDestructor {
- protected:
- virtual ~Derived() {};
- };
- %}