Exemplo n.º 1
0
        /// <summary>
        /// Called for each lua_lock call
        /// </summary>
        /// <param name = "luaState"></param>
        /// Not yet used

        /*int LockCallback(LuaCore.lua_State luaState)
         * {
         *      // Monitor.Enter(luaLock);
         *      return 0;
         * }*/

        /// <summary>
        /// Called for each lua_unlock call
        /// </summary>
        /// <param name = "luaState"></param>
        /// Not yet used

        /*int UnlockCallback(LuaCore.lua_State luaState)
         * {
         *      // Monitor.Exit(luaLock);
         *      return 0;
         * }*/

        public void Close()
        {
            if (_StatePassed)
            {
                return;
            }

            //////   if(luaState != LuaCore.lua_State.Zero)
            if (!luaState.IsNull())
            {
                LuaCore.lua_close(luaState);
            }
            //luaState = LuaCore.lua_State.Zero; <- suggested by Christopher Cebulski http://luaforge.net/forum/forum.php?thread_id = 44593&forum_id = 146
        }