//========= Copyright 2016-2018, HTC Corporation. All rights reserved. =========== using System.Collections.Generic; namespace HTC.UnityPlugin.Utility { public static class DictionaryPool { private static readonly ObjectPool> pool = new ObjectPool>(() => new Dictionary(), null, e => e.Clear()); public static Dictionary Get() { return pool.Get(); } public static void Release(Dictionary toRelease) { pool.Release(toRelease); } } }