Esempio n. 1
0
        private void Clear()
        {
            for (int i = 0; i < _createdCount; i++)
            {
                _created[i].PoolReturning -= PoolItemReturn;
                _created[i].PoolRemoving  -= Remove;
                _created[i] = null;
            }

            _createdCount = 0;

            if (_poolStack != null)
            {
                _poolStack.Clear();
                _poolStack = null;
            }
        }
Esempio n. 2
0
 public PoolLazyItems(int poolCapacity)
 {
     _poolStack = new PoolStack(poolCapacity);
     _created   = new IPoolable[poolCapacity];
 }