Ejemplo n.º 1
0
        /// <summary>
        /// 释放工厂所创建的所有对象,包括空闲对象
        /// </summary>
        public static void Release()
        {
            m_isInit = false;

            for (int i = 0; i < m_objectList.Count; i++)
            {
                m_objectList[i].ReleaseInFactory();
                m_objectList[i].Dispose();
            }

            m_objectList.Clear();

            m_recycler.Release();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 释放工厂创建的所有对象,包括空闲对象
        /// </summary>
        public static void Release()
        {
            m_isInit = false;

            foreach (var pair in m_objMap)
            {
                pair.Value.ReleaseInFactory();
                pair.Value.Dispose();
            }

            m_objMap.Clear();
            m_recycler.Release();
            m_viewRoot = null;
        }