mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-04-30 23:07:44 +02:00
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;
|
|
}
|
|
}
|
|
}
|