Example #1
0
 public void ClearHelpers()
 {
     RecyclableMemoryStreamManagerHelper.Clear();
     GenericArrayPoolCachesRegister.ClearAll();
     GenericTwoDArrayCacheRegister.ClearAll();
     GenericSlabAllocatedArrayPoolRegister.ClearAll();
 }
Example #2
0
        public static ISlabAllocatedArrayPool <T> Caches()
        {
            if (_pool == null)
            {
                lock (lockObj)
                {
                    if (_pool == null)
                    {
                        _pool = new SlabAllocatedArrayPool <T>();
                        GenericSlabAllocatedArrayPoolRegister.Add(_pool);
                    }
                }
            }

            return(_pool);
        }