Beispiel #1
0
        /// <summary>
        ///  吐一个对象
        /// </summary>
        /// <returns></returns>
        public IPool Vomiting()
        {
            IPool temp = null;

            if (pool.Count > 0)
            {
                temp = pool.Pop();
            }
            else
            {
                if (Create != null)
                {
                    temp = Create();
                }
            }
            if (temp != null)
            {
                temp.BeVomiting();
            }
            return(temp);
        }