mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Make sure to dispose some WeakRefs
This commit is contained in:
parent
6b2ee7a54d
commit
99d497ca7c
2 changed files with 3 additions and 1 deletions
|
@ -7,7 +7,6 @@ namespace LibHac.FsSrv.Impl;
|
|||
|
||||
public class DeepRetryFileSystem : ForwardingFileSystem
|
||||
{
|
||||
// ReSharper disable once NotAccessedField.Local
|
||||
private WeakRef<DeepRetryFileSystem> _selfReference;
|
||||
private SharedRef<IRomFileSystemAccessFailureManager> _accessFailureManager;
|
||||
|
||||
|
@ -31,6 +30,8 @@ public class DeepRetryFileSystem : ForwardingFileSystem
|
|||
public override void Dispose()
|
||||
{
|
||||
_accessFailureManager.Destroy();
|
||||
_selfReference.Destroy();
|
||||
|
||||
base.Dispose();
|
||||
}
|
||||
|
||||
|
|
|
@ -290,6 +290,7 @@ public class FileSystemInterfaceAdapter : IFileSystemSf
|
|||
public void Dispose()
|
||||
{
|
||||
_baseFileSystem.Destroy();
|
||||
_selfReference.Destroy();
|
||||
}
|
||||
|
||||
private static ReadOnlySpan<byte> RootDir => "/"u8;
|
||||
|
|
Loading…
Reference in a new issue