SharedPools.cs 426 B

1234567891011121314151617
  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 ObjectPool<T>(() => new T(), 20);
  9. }
  10. public static ObjectPool<T> Default<T>()
  11. where T : class, new()
  12. {
  13. return DefaultPool<T>.Instance;
  14. }
  15. }
  16. }