コード例 #1
0
    /// <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();
        }
    }
コード例 #2
0
        /// <summary>
        /// 终结助手
        /// </summary>
        public void OnTermination()
        {
            _defineEntities.Clear();

            foreach (var group in _entitiesGroup)
            {
                Main.Kill(group.Value);
            }
            _entitiesGroup.Clear();
            Entities.Clear();
            ObjectPools.Clear();
        }