Exemplo n.º 1
0
        public void ClearPool <T>() where T : class
        {
            ClassPool2 <T> pool = GetPool <T>();

            if (pool != null)
            {
                pool.Clear();
            }
        }
Exemplo n.º 2
0
        //-------∽-★-∽<T>∽-★-∽--------//


        public ClassPool2 <T> CreatePool <T>() where T : class
        {
            Type t = typeof(T);

            if (m_t2pool.ContainsKey(t))
            {
                return(m_t2pool[t] as ClassPool2 <T>);
            }
            ClassPool2 <T> pool = new ClassPool2 <T>();

            m_t2pool[t] = pool;
            return(pool);
        }