29 using System.Collections.Generic;
31 namespace OpenSim.Framework
53 private Stack<T> m_pool;
58 private int m_maxPoolSize;
60 private Func<T> m_createFunction;
62 public Pool(Func<T> createFunction,
int maxSize)
64 m_maxPoolSize = maxSize;
65 m_createFunction = createFunction;
66 m_pool =
new Stack<T>(m_maxPoolSize);
76 return m_createFunction();
84 if (m_pool.Count >= m_maxPoolSize)
Pool(Func< T > createFunction, int maxSize)