> >> 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
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users