Exemple #1
0
        /// <summary>
        /// Collect all KEngine's resource unused loaders
        /// </summary>
        public static void Collect()
        {
            while (ABManager.UnUsesLoaders.Count > 0)
            {
                ABManager.DoGarbageCollect();
            }

            Resources.UnloadUnusedAssets();
            System.GC.Collect();
        }
        /// <summary>
        /// 执行Release,并立刻触发残余清理
        /// </summary>
        /// <param name="gcNow">是否立刻触发垃圾回收,默认垃圾回收是隔几秒进行的</param>
        public virtual void Release(bool gcNow)
        {
//            if (gcNow)
//                IsBeenReleaseNow = true;

            Release();

            if (gcNow)
            {
                ABManager.DoGarbageCollect();
            }
        }