예제 #1
0
        public T Get()
        {
            T instance;

            if (IsEmpty)
            {
                instance = _CreateInstance();
            }
            else
            {
                instance = _storage[--_freeToPutIndex];
                _creator?.AfterRestore(instance);
                _storage[_freeToPutIndex] = default;
            }

            return(instance);
        }