diff options
| author | jhorv <38920027+jhorv@users.noreply.github.com> | 2024-06-16 16:47:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-16 17:47:47 -0300 |
| commit | 311ca3c3f1719c0effeedfb8cf90d9f2675ef8a5 (patch) | |
| tree | 769ffd984001a7b35eea5d64af53873b89ddc05e /src/Ryujinx.Common/Memory/MemoryOwner.cs | |
| parent | 3193ef10833bc0d27e2701c7759ab02674d672d3 (diff) | |
fix: for pooled memory used for reference types, clear it on return to the pool so that it doesn't prevent GC of the instances it contained (#6937)
Diffstat (limited to 'src/Ryujinx.Common/Memory/MemoryOwner.cs')
| -rw-r--r-- | src/Ryujinx.Common/Memory/MemoryOwner.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Ryujinx.Common/Memory/MemoryOwner.cs b/src/Ryujinx.Common/Memory/MemoryOwner.cs index 5e567ab8..b7fe1db7 100644 --- a/src/Ryujinx.Common/Memory/MemoryOwner.cs +++ b/src/Ryujinx.Common/Memory/MemoryOwner.cs @@ -124,7 +124,7 @@ namespace Ryujinx.Common.Memory if (array is not null) { - ArrayPool<T>.Shared.Return(array); + ArrayPool<T>.Shared.Return(array, RuntimeHelpers.IsReferenceOrContainsReferences<T>()); } } |
