Apply TSR Berry suggestion to add a GC.SuppressFinalize in MemoryBlock.cs

This commit is contained in:
Mary 2022-12-02 09:25:44 +01:00 committed by TSR Berry
parent e2acecbcea
commit 1725e03bda
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2

View file

@ -379,7 +379,12 @@ namespace Ryujinx.Memory
/// <remarks> /// <remarks>
/// It's an error to use the memory block after disposal. /// It's an error to use the memory block after disposal.
/// </remarks> /// </remarks>
public void Dispose() => FreeMemory(); public void Dispose()
{
FreeMemory();
GC.SuppressFinalize(this);
}
~MemoryBlock() => FreeMemory(); ~MemoryBlock() => FreeMemory();