update resource manager

This commit is contained in:
hevinci
2023-10-24 18:38:31 +08:00
parent d30a8aefa4
commit e8b5a58a90
3 changed files with 13 additions and 7 deletions
@@ -116,9 +116,8 @@ namespace YooAsset
return;
*/
_removeList.Clear();
// 获取移除列表
_removeList.Clear();
foreach (var provider in _providers)
{
if (provider.CanDestroy())
@@ -136,8 +135,6 @@ namespace YooAsset
// 移除资源提供者
Impl.RemoveBundleProviders(_removeList);
_removeList.Clear();
}
@@ -199,8 +199,9 @@ namespace YooAsset
/// </summary>
public void ReleaseAllHandles()
{
foreach (var handle in _handles)
for (int i = _handles.Count - 1; i >= 0; i--)
{
var handle = _handles[i];
handle.ReleaseInternal();
}
}