Console.Clear();
LuaGlobal env = LuaState.CreateEnvironment();
LuaResult res = env.DoChunk(scriptpath);
Changing the MyTimer.Enabled = false still executes the Elapsed function.
The script engine is caching the calls and requires, but is it wanted behavior to also cache delegates?
foreach(var ls in LuaStates)
{
ls.Dispose();
ls.Clear();
}
try
{
using (Lua LuaState = new Lua())
{
Console.Clear();
LuaGlobal env = LuaState.CreateEnvironment();
LuaResult res = env.DoChunk(scriptpath);
LuaStates.Add(LuaState);
}
}
catch (LuaException ex)
{
Console.WriteLine(ex.ToString(), 10);
}
Even after proper dispose, the delegate is still persistent.
NeoLua Version: v1.3.14 Example to reproduce:
Changing the MyTimer.Enabled = false still executes the Elapsed function. The script engine is caching the calls and requires, but is it wanted behavior to also cache delegates?
Even after proper dispose, the delegate is still persistent.