LuaInterface.LuaDLL.luaL_ref C# (CSharp) Method

luaL_ref() private method

private luaL_ref ( IntPtr luaState, int registryIndex ) : int
luaState System.IntPtr
registryIndex int
return int
        public static extern int luaL_ref(IntPtr luaState, int registryIndex);

Usage Example

示例#1
0
            public static void RefString(IntPtr strPoint, int index, string s, IntPtr L)
            {
                int oldTop = LuaDLL.lua_gettop(L);

                LuaDLL.lua_pushvalue(L, index);
                //把字符串ref了之后就不GC了
                LuaDLL.luaL_ref(L, LuaIndexes.LUA_REGISTRYINDEX);
                LuaDLL.lua_settop(L, oldTop);
                stringDict[(long)strPoint] = s;
            }
All Usage Examples Of LuaInterface.LuaDLL::luaL_ref
LuaDLL