Re: [luabind] Problem deriving classes in LUA and deleting it in C++
Brought to you by:
arvidn,
daniel_wallin
From: Dmitriy I. <ias...@gs...> - 2006-08-28 08:51:58
|
ГСВ> I creating class in C++ and binding it as shown: ГСВ> C++: ГСВ> class ww_dialog { ГСВ> public: ГСВ> ww_dialog(void); ГСВ> }; ГСВ> module(xState) [ ГСВ> class_<ww_dialog>("ww_dialog") ГСВ> .def(constructor<>()) ГСВ> ]; ГСВ> In my script i want to be able to derive LUA class from a C++ class, but ГСВ> I don't want to garbage collecting derived class in by LUA garbage ГСВ> collector. With this code I receive a SIGSEGV when I deleting LUA class ГСВ> instances in a C++ and when i destroying LUA state. I am a newbie in ГСВ> luabind, can you help me more descriptive? pass instance of the newly created class instance to C++ via function with adopt policy to Arvid & Daniel: is it possible to export constructor of a class with adopt policy? -- Best regards, Dmitriy mailto:ias...@gs... |