aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Memory/MemoryBlock.cs
diff options
context:
space:
mode:
authorMary-nyan <mary@mary.zone>2023-01-01 17:35:29 +0100
committerGitHub <noreply@github.com>2023-01-01 17:35:29 +0100
commitb6614c6ad5d7d19594b80f4917df27bf476e8f03 (patch)
tree677d79ed05551c2f6c05b35135785255b125d7e2 /Ryujinx.Memory/MemoryBlock.cs
parentb1d4b174a654432b84e4d83077ddb9bc43c7b089 (diff)
chore: Update tests dependencies (#3978)1.1.502
* chore: Update tests dependencies * Apply TSR Berry suggestion to add a GC.SuppressFinalize in MemoryBlock.cs * Ensure we wait for the test thread to be dead on PartialUnmap * Use platform attribute for os specific tests * Make P/Invoke methods private * Downgrade NUnit3TestAdapter to 4.1.0 * test: Disable warning about platform compat for ThreadLocalMap() Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
Diffstat (limited to 'Ryujinx.Memory/MemoryBlock.cs')
-rw-r--r--Ryujinx.Memory/MemoryBlock.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Ryujinx.Memory/MemoryBlock.cs b/Ryujinx.Memory/MemoryBlock.cs
index 41e6224b..6b9d852d 100644
--- a/Ryujinx.Memory/MemoryBlock.cs
+++ b/Ryujinx.Memory/MemoryBlock.cs
@@ -379,7 +379,12 @@ namespace Ryujinx.Memory
/// <remarks>
/// It's an error to use the memory block after disposal.
/// </remarks>
- public void Dispose() => FreeMemory();
+ public void Dispose()
+ {
+ FreeMemory();
+
+ GC.SuppressFinalize(this);
+ }
~MemoryBlock() => FreeMemory();