internal static void Update() { var frameCount = Time.frameCount; deleteList.Clear(); var items = removeDic.GetEnumerator(); while (items.MoveNext()) { var kv = items.Current; if (frameCount >= kv.Value) { deleteList.Add(kv.Key); CacheManager.UnloadSecurity(kv.Key); } } if (dependencies.Count > 0) { foreach (var item in dependencies) { Add(item); } dependencies.Clear(); } for (int i = 0; i < deleteList.Count; i++) { removeDic.Remove(deleteList[i]); } }
internal static void Update() { var frameCount = Time.frameCount; deleteList.Clear(); int count = removeList.Count; string Key; int delFrame; for (int i = 0; i < count; i++) { Key = removeList[i]; if (removeDic.TryGetValue(Key, out delFrame) && frameCount >= delFrame) { deleteList.Add(Key); CacheManager.UnloadSecurity(Key); } else { break; } } for (int i = 0; i < deleteList.Count; i++) { Remove(deleteList[i]); } }