示例#1
0
    public T Acquire()
    {
        T obj;

        if (pool.Count > 0)
        {
            obj = pool.Pop();
        }
        else
        {
            obj = new T();
        }

#if DEBUG
        NetAssert.True(obj.pooled);
        obj.pooled = false;
#endif

        return(obj);
    }
示例#2
0
 public NetworkArray_Entity(int length, int stride)
     : base(length, stride)
 {
     NetAssert.True(stride == 1);
 }
示例#3
0
 internal NetworkArray_ProtocolToken(int length, int stride)
     : base(length, stride)
 {
     NetAssert.True(stride == 1);
 }