diff --git a/src/LibHac/FsSrv/Impl/DeepRetryFileSystem.cs b/src/LibHac/FsSrv/Impl/DeepRetryFileSystem.cs index d615c5e5..1179a4e6 100644 --- a/src/LibHac/FsSrv/Impl/DeepRetryFileSystem.cs +++ b/src/LibHac/FsSrv/Impl/DeepRetryFileSystem.cs @@ -7,7 +7,6 @@ namespace LibHac.FsSrv.Impl; public class DeepRetryFileSystem : ForwardingFileSystem { - // ReSharper disable once NotAccessedField.Local private WeakRef _selfReference; private SharedRef _accessFailureManager; @@ -31,6 +30,8 @@ public class DeepRetryFileSystem : ForwardingFileSystem public override void Dispose() { _accessFailureManager.Destroy(); + _selfReference.Destroy(); + base.Dispose(); } diff --git a/src/LibHac/FsSrv/Impl/FileSystemInterfaceAdapter.cs b/src/LibHac/FsSrv/Impl/FileSystemInterfaceAdapter.cs index 4536f0f6..bfac1aa2 100644 --- a/src/LibHac/FsSrv/Impl/FileSystemInterfaceAdapter.cs +++ b/src/LibHac/FsSrv/Impl/FileSystemInterfaceAdapter.cs @@ -290,6 +290,7 @@ public class FileSystemInterfaceAdapter : IFileSystemSf public void Dispose() { _baseFileSystem.Destroy(); + _selfReference.Destroy(); } private static ReadOnlySpan RootDir => "/"u8;