LuaInterface.LuaObjectPool.Remove C# (CSharp) Method

Remove() public method

public Remove ( int pos ) : object
pos int
return object
        public object Remove(int pos)
        {
            if (pos > 0 && pos < count)
            {
                object o = list[pos].obj;
                list[pos].obj = null;
                list[pos].index = head.index;
                head.index = pos;

                return o;
            }

            return null;
        }

Usage Example

        public void RemoveObject(int udata)
        {
            object o = objects.Remove(udata);

            if (o != null && !TypeChecker.IsValueType(o.GetType()))
            {
                objectsBackMap.Remove(o);
            }
        }
All Usage Examples Of LuaInterface.LuaObjectPool::Remove