1 %module xxx 2 3 %include <boost_shared_ptr.i> 4 5 %shared_ptr(B); 6 %shared_ptr(C); 7 8 %inline %{ 9 #include <stdio.h> 10 #include <boost/shared_ptr.hpp> 11 12 struct A { ~AA13 virtual ~A() {} 14 }; 15 16 struct B { ~BB17 virtual ~B() {} 18 }; 19 20 struct C : B, A { ~CC21 virtual ~C() {} 22 }; 23 24 struct D : C { ~DD25 virtual ~D() {} 26 }; 27 %} 28 29 30