Close Lua State And Reopen
I'm using Lua in android but is not very clear if I can do this: LuaState L = null; function loaddata(String data) { if ( L !=null && L.isClosed() == false) L.close(
Solution 1:
In your code when you call L.close() you are closing the existing lua state.
You then use LuaStateFactory.newLuaState() to create a new (clean) lua state.
Nothing from a previous call to that function will exit in the new state.
(I'm assuming the functions here work as they would appear to and as the C api functions of similar names function.)
Post a Comment for "Close Lua State And Reopen"