Exemple #1
0
        public void InitialCopyOf(CCList <T> other)
        {
            if (other == null)
            {
                this.OnRecycle();
                return;
            }

            for (int i = 0; i < other.array.Length; ++i)
            {
                if (other.array[i] != null)
                {
                    if (this.array[i] != null)
                    {
                        PoolArray <T> .Release(ref this.array[i]);
                    }
                    this.array[i] = PoolArray <T> .Claim(other.array[i].Length);
                }
                else
                {
                    PoolArray <T> .Release(ref this.array[i]);
                }

                ArrayUtils.Clear(this.array[i]);
            }

            this.index      = other.index;
            this.count      = other.count;
            this.fuzzyCount = other.fuzzyCount;
        }
Exemple #2
0
        public void OnRecycle()
        {
            for (int i = 0; i < this.array.Length; ++i)
            {
                if (this.array[i] != null)
                {
                    PoolArray <T> .Release(ref this.array[i]);
                }
            }

            this.index      = 0;
            this.count      = 0;
            this.fuzzyCount = 0;
        }