mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-07 22:38:37 +00:00
18 lines
426 B
C#
18 lines
426 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 ObjectPool<T>(() => new T(), 20);
|
|||
|
}
|
|||
|
|
|||
|
public static ObjectPool<T> Default<T>()
|
|||
|
where T : class, new()
|
|||
|
{
|
|||
|
return DefaultPool<T>.Instance;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|