LuaInterface.ObjectTranslator.collectObject C# (CSharp) Method

collectObject() private method

Given the Lua int ID for an object remove it from our maps
private collectObject ( int udata ) : void
udata int
return void
        internal void collectObject(int udata)
        {
            object o;
            bool found = objects.TryGetValue(udata, out o);

            // The other variant of collectObject might have gotten here first, in that case we will silently ignore the missing entry
            if (found)
            {
                // Debug.WriteLine("Removing " + o.ToString() + " @ " + udata);

                objects.Remove(udata);
                objectsBackMap.Remove(o);
            }
        }

Same methods

ObjectTranslator::collectObject ( object o, int udata ) : void

Usage Example

Example #1
0
        public static int collectObject(IntPtr luaState)
        {
            int num = LuaDLL.luanet_rawnetobj(luaState, 1);

            if (num != -1)
            {
                ObjectTranslator objectTranslator = ObjectTranslator.FromState(luaState);
                objectTranslator.collectObject(num);
            }
            return(0);
        }
All Usage Examples Of LuaInterface.ObjectTranslator::collectObject