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
@@ -4,7 +4,7 @@ using Mono.Unix.Native;
namespace Infrastructure.Verticals.Files;
public class UnixHardLinkFileService : IHardLinkFileService
public class UnixHardLinkFileService : IHardLinkFileService, IDisposable
{
private readonly ILogger<UnixHardLinkFileService> _logger;
private readonly ConcurrentDictionary<ulong, int> _inodeCounts = new();
@@ -83,4 +83,9 @@ public class UnixHardLinkFileService : IHardLinkFileService
throw;
}
}
public void Dispose()
{
_inodeCounts.Clear();
}
}