예제 #1
0
        public IPooled Take()
        {
            if (poolStack.Count == 0)
            {
                AddInstanceToPool();
            }
            IPooled item = poolStack.Pop();

            item.TakeFromPool();
            activeItems.Add(item);
            return(item);
        }