Removed some memory leaks

This commit is contained in:
2026-01-12 22:09:07 +01:00
parent 37c6609ba9
commit 576a590104
28 changed files with 1117 additions and 589 deletions

View File

@@ -93,7 +93,10 @@ namespace EonaCat.Logger.LogClient
private async Task FlushAsync()
{
if (_logQueue.IsEmpty) return;
if (_logQueue.IsEmpty)
{
return;
}
await _flushSemaphore.WaitAsync();
try
@@ -166,7 +169,10 @@ namespace EonaCat.Logger.LogClient
public void Dispose()
{
if (_disposed) return;
if (_disposed)
{
return;
}
_flushTimer?.Dispose();
FlushAsync().GetAwaiter().GetResult();