mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-10 12:49:13 +00:00
2989c163a8
* editorconfig: Add default charset * Change file encoding from UTF-8-BOM to UTF-8
17 lines
409 B
C#
17 lines
409 B
C#
namespace Ryujinx.Common
|
|
{
|
|
public static class SharedPools
|
|
{
|
|
private static class DefaultPool<T>
|
|
where T : class, new()
|
|
{
|
|
public static readonly ObjectPool<T> Instance = new(() => new T(), 20);
|
|
}
|
|
|
|
public static ObjectPool<T> Default<T>()
|
|
where T : class, new()
|
|
{
|
|
return DefaultPool<T>.Instance;
|
|
}
|
|
}
|
|
}
|