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();
L = LuaStateFactory.newLuaState();
L.openLibs();
L.LdoString(data);
}
loaddata(string_1) ;
//and later
loaddata(string_2);
I want to clear the L and use it with another data, string_2
.
Will my function L.LdoString(data);
have a new data corresponding to string_2
?
Or will it be string_1
plus string_2
in the L
?