Нашёл причину утечки памяти

This commit is contained in:
ThomasCharester committed 2026-03-24 15:16:17 +03:00
1 parent 60c28f54f2
commit 320847af5b
229 files changed
+3094 -18282

No files matched your search

@@ -73,10 +73,15 @@ namespace Code.Infrastructure.Audio
public void ReleaseAudios(AudioNames groupName)
{
UnityEngine.Debug.LogWarning($"Audios unloaded {groupName}");
_eventBus.RaiseEvent<IAudioClipsEventHandle>(x=> x.AudioClipsUnLoaded(groupName));
if (_clipsHandles[groupName].Count == 0) return;
foreach (var handle in _clipsHandles)
foreach (var handle in _clipsHandles[groupName])
Addressables.Release(handle.Value);
_clipsHandles[groupName].Clear();
_eventBus.RaiseEvent<IAudioClipsEventHandle>(x=> x.AudioClipsUnLoaded(groupName));
}
public void Dispose()
{
@@ -87,7 +92,8 @@ namespace Code.Infrastructure.Audio
handle.Value.Release();
}
}
_clipsHandles.Clear();
_configsHandle.Release();
}
}