예제 #1
0
        public ContainerSlot Rent()
        {
            if (pool is null)
            {
                return(new ContainerSlot());
            }

            var rent = pool;

            pool = null;
            return(rent);
        }
예제 #2
0
 public void Return(ContainerSlot slot)
 {
     slot.Clear();
     pool ??= slot;
 }