示例#1
0
文件: Lua.cs 项目: JumpNotZero/NLua
        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;
 }
 static MemoryConstrainedLuaRuntime()
 {
     allocateCallback = Allocate;
 }