aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Common/Pools/SharedPools.cs
blob: 272a741804fbd36cba538f11eb9a5e7cc379c48a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
        }
    }
}