Beispiel #1
0
        /// <summary>
        /// GCとか
        /// </summary>
        private IEnumerator CallGC()
        {
            //	Resourcesの未使用を解放
            yield return(null);

            using (var scope = StopWatchScope.Create("UnloadProvider.[Resources.UnloadUnusedAssets]"))
            {
                var unload = Resources.UnloadUnusedAssets();
                yield return(unload);
            }

            yield return(null);

            GC.Collect(0);
        }
Beispiel #2
0
 /// <summary>
 /// 未使用のモノを破棄
 /// </summary>
 public IEnumerator UnloadUnusedAssets()
 {
     //	参照の無いやつを取得
     GetFreeBudleList(ref m_bufferList);
     using (var scope = StopWatchScope.Create("UnloadProvider.[UnusedBudle.Unload]"))
     {
         //	解放
         foreach (var bundle in m_bufferList)
         {
             bundle.Unload();
         }
     }
     ChipstarLog.Log_DisposeUnused(m_bufferList);
     yield return(CallGC());
 }