ThreadStaticArray.cs
1 using System; 2 3 namespace Ryujinx.Common.Pools 4 { 5 public static class ThreadStaticArray<T> 6 { 7 [ThreadStatic] 8 private static T[] _array; 9 10 public static ref T[] Get() 11 { 12 _array ??= new T[1]; 13 14 return ref _array; 15 } 16 } 17 }