/// <summary> /// 清空指定对象池中数据 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="key"></param> public static void ClearPools <T>(PoolKey key) { ObjectPools <T> pool = GetPools <T>(key); if (pool != null) { pool.Clear(); } }
/// <summary> /// 终结助手 /// </summary> public void OnTermination() { _defineEntities.Clear(); foreach (var group in _entitiesGroup) { Main.Kill(group.Value); } _entitiesGroup.Clear(); Entities.Clear(); ObjectPools.Clear(); }