Example #1
0
        public PoolableList <T> Rent()
        {
            PoolableList <T> item;

            if (Pool.Count > 0)
            {
                item = Pool.Pop();
            }
            else
            {
                item = new PoolableList <T>(this);
            }

            return(item);
        }
Example #2
0
 public void Return(PoolableList <T> item)
 {
     item.Clear();
     Pool.Push(item);
 }