[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Confused by Lua garbage collection tear down order when there are references between objects
- From: Eric Wing <ewmailing@...>
- Date: Wed, 21 May 2014 02:43:08 -0700
Thank you for all the responses. That clears a lot up. Thanks for
mentioning the lua_close case too. That insight was also valuable.
So I went with a luaL_ref/luaL_unref workaround which solves
everything but the lua_close case.
I had the idea of iterating through the _G table and setting all the
references to nil and forcing garbage collection before close, but in
testing, I noticed there were a lot of local "global" variables in use
in my programs which I can't reach. Any other ideas along these lines,
perhaps using the debug library?
Thanks,
Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/