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/SpanOwner.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/SpanOwner.cs')
| -rw-r--r-- | src/Ryujinx.Common/Memory/SpanOwner.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Ryujinx.Common/Memory/SpanOwner.cs b/src/Ryujinx.Common/Memory/SpanOwner.cs index a4b4adf3..acb20bca 100644 --- a/src/Ryujinx.Common/Memory/SpanOwner.cs +++ b/src/Ryujinx.Common/Memory/SpanOwner.cs @@ -108,7 +108,7 @@ namespace Ryujinx.Common.Memory [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Dispose() { - ArrayPool<T>.Shared.Return(_array); + ArrayPool<T>.Shared.Return(_array, RuntimeHelpers.IsReferenceOrContainsReferences<T>()); } } } |
