Lightweight Stack Pool.
Handy class for pooling stacks of type T.
Claim a new stack using
Stack<SomeClass> foo = StackPool<SomeClass>.Claim ();
Use it and do stuff with it
Release it with
You do not need to clear the stack before releasing it. After you have released a stack, you should never use it again.
This class is not thread safe
Public Static Methods
Claim a stack.
Clears all pooled stacks of this type.
Number of stacks of this type in the pool.
Releases a stack.
Makes sure the pool contains at least count pooled items.