Author: muggenhor
Date: Mon Sep 8 23:34:17 2008
New Revision: 5972
URL: http://svn.gna.org/viewcvs/warzone?rev=5972&view=rev
Log:
* Don't store a Lua reference to the widget itself in the callback struct
- This struct is only destroyed when the callback is destroyed, which (by
default) only happens when the widget is destroyed.
- Keeping a reference to the widget prevents Lua's garbage collector from
ever destroying the widget
- Thus store a reference to the widget in a Lua "weak table"
- Also store the callback function in this table
* Thus we now only keep a reference to a Lua table referring to the widget
(weakly) and the function (normally/strongly)
Modified:
trunk/lib/betawidget/betawidget.i
_______________________________________________
Warzone-commits mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-commits