Re: Clear lua-side allocated objects?
Iliya Trendafilov <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
You must set these global lua variables to nil (along with any other lua variables or luabind::objects that reference these instances) one way or another and call lua_gc(). That should free your instances. Depending on your scenario, dumping the entire lua_State (with lua_close) and creating a new one might also be an option although it's probably an overkill if you only have a few instances to clear. On Sat, Jan 9, 2010 at 2:25 PM, Kristoffer Danielsson <[email protected]> wrote: > Inside my script I instantiate several of my heavy C++ classes (held by > global lua variables). Then, at a later point, I want to clear these > allocations from within C++. > > That is, I want to reset the script to its initial state. How can this be > done? > > ________________________________ > Ladda ner nya Internet Explorer 8! Ladda ner nya Internet Explorer 8! > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > luabind-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/luabind-user > > ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev