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