explicit dispose and clean on some objects

This commit is contained in:
Flaminel
2025-02-23 10:59:43 +02:00
parent e8d287de84
commit d27562a889
4 changed files with 16 additions and 4 deletions
@@ -5,7 +5,7 @@ using Microsoft.Win32.SafeHandles;
namespace Infrastructure.Verticals.Files;
public class WindowsHardLinkFileService : IHardLinkFileService
public class WindowsHardLinkFileService : IHardLinkFileService, IDisposable
{
private readonly ILogger<WindowsHardLinkFileService> _logger;
private readonly ConcurrentDictionary<ulong, int> _fileIndexCounts = new();
@@ -110,4 +110,9 @@ public class WindowsHardLinkFileService : IHardLinkFileService
public uint FileIndexHigh;
public uint FileIndexLow;
}
public void Dispose()
{
_fileIndexCounts.Clear();
}
}