public Lua() { LuaAllocator allocateCallback = new LuaAllocator(this.Allocate); this.allocateHandle = GCHandle.Alloc(allocateCallback); LuaCFunction panicCallback = new LuaCFunction(this.Panic); this.panicHandle = GCHandle.Alloc(panicCallback); this.state = LuaCore.NewState(allocateCallback, IntPtr.Zero); LuaCore.SetPanicCallback(this.state, panicCallback); }
static MemoryConstrainedLuaRuntime() { allocateCallback = Allocate; }