Add NonCopyableDisposable attributes where needed

This commit is contained in:
Alex Barney 2022-11-23 19:59:52 -07:00
parent c97c0f8297
commit 72b9a1e5d0
3 changed files with 4 additions and 0 deletions

View file

@ -1,4 +1,5 @@
using System; using System;
using LibHac.Common;
using LibHac.FsSrv.Impl; using LibHac.FsSrv.Impl;
using LibHac.FsSrv.Storage; using LibHac.FsSrv.Storage;
using LibHac.FsSystem; using LibHac.FsSystem;
@ -29,6 +30,7 @@ public class FileSystemServer : IDisposable
} }
} }
[NonCopyableDisposable]
internal struct FileSystemServerGlobals : IDisposable internal struct FileSystemServerGlobals : IDisposable
{ {
public HorizonClient Hos; public HorizonClient Hos;

View file

@ -16,6 +16,7 @@ using IStorage = LibHac.Fs.IStorage;
namespace LibHac.FsSrv.Storage; namespace LibHac.FsSrv.Storage;
[NonCopyableDisposable]
internal struct GameCardServiceGlobals : IDisposable internal struct GameCardServiceGlobals : IDisposable
{ {
public SdkMutexType StorageDeviceMutex; public SdkMutexType StorageDeviceMutex;

View file

@ -87,6 +87,7 @@ public enum KeyType
public class NcaFileSystemDriver : IDisposable public class NcaFileSystemDriver : IDisposable
{ {
[NonCopyableDisposable]
public struct StorageContext : IDisposable public struct StorageContext : IDisposable
{ {
public bool OpenRawStorage; public bool OpenRawStorage;