/// <summary> /// Closes lua and clear errorlog and any references to functions that was registered with lua /// </summary> public void CloseLua() { if (L != IntPtr.Zero) { Lua.lua_close(L); L = IntPtr.Zero; } //clear any references to callbacks to allow the garbage collector collect them m_refs.Clear(); m_errors.Clear(); }