From: John L. <jla...@gm...> - 2013-10-07 20:33:55
|
> >> I'm trying to understand how wxLua handles its event mechanism. I can > see that > >> for every call to Connect(), wxLua will create a new object of > wxLuaEventCallback. > >> But I don't see where these get deleted. > > They are deleted by the wxEvtHandler when Connect() is called. http://sourceforge.net/p/wxlua/svn/HEAD/tree/trunk/wxLua/modules/wxlua/wxlcallb.cpp#l93 Note the comment about the userdata here: http://docs.wxwidgets.org/trunk/classwx_evt_handler.html#a78719e8b82c9f9c6e4056b3449df1943 Separately, wxluaR_unref() is used to unref the Lua event handler functions that are called when a wxEvent is handled. You see two calls to it, one for normal event handling and a separate one for window destruction, this is to be expected. Regards, John |