Hi, i need some help on this. //c++ class Simulation { Simulation() {/*...*/} run() {/**/} };
void modifySimulation( Simulation & sim ) {/*...*/} BOOST_PYTHON_MODULE(pySimulation) { using namespace boost::python; class_<Simulation, boost::noncopyable>("Simulation") .def("run" ,&Simulation_t::run ) ; def("modifySimulation",modifySimulation); } #python import pySimulation sim = pySimulation.Simulation() #fine modifySimulation(sim) #fine as well, I can debug it, and it does the right thing sim.run() on this last statement the system crashes. python is basically telling me that sim is unbound. it seems to mee that the Simulation object is destroyed, but i cannot see why nor how i am supposed to prevent this using boost.python _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig