SharedPools.cs
1 namespace Ryujinx.Common 2 { 3 public static class SharedPools 4 { 5 private static class DefaultPool<T> 6 where T : class, new() 7 { 8 public static readonly ObjectPool<T> Instance = new(() => new T(), 20); 9 } 10 11 public static ObjectPool<T> Default<T>() 12 where T : class, new() 13 { 14 return DefaultPool<T>.Instance; 15 } 16 } 17 }