using System.Collections.Generic; namespace UnityEditor.Graphing { public static class QueuePool { // Object pool to avoid allocations. static readonly ObjectPool> k_QueuePool = new ObjectPool>(null, l => l.Clear()); public static Queue Get() { return k_QueuePool.Get(); } public static PooledObject> GetDisposable() { return k_QueuePool.GetDisposable(); } public static void Release(Queue toRelease) { k_QueuePool.Release(toRelease); } } }