/// <summary> /// 释放工厂所创建的所有对象,包括空闲的对象 /// </summary> public static void Release() { m_isInit = false; for (int i = 0; i < m_listObject.Count; i++) { m_listObject[i].ReleaseInFactory(); m_listObject[i].Dispose(); } m_listObject.Clear(); m_recycler.Release(); }
/// <summary> /// 释放工厂所创建的所有对象,包括空闲的对象 /// </summary> public static void Release() { m_isInit = false; foreach (var pair in m_mapObject) { pair.Value.ReleaseInFactory(); pair.Value.Dispose(); } m_mapObject.Clear(); m_recycler.Release(); m_viewRoot = null; }