using System.Collections.Generic; using ModestTree; namespace Zenject { public class DictionaryPool : StaticMemoryPool> { static DictionaryPool _instance = new DictionaryPool(); public DictionaryPool() { OnSpawnMethod = OnSpawned; OnDespawnedMethod = OnDespawned; } public static DictionaryPool Instance { get { return _instance; } } static void OnSpawned(Dictionary items) { Assert.That(items.IsEmpty()); } static void OnDespawned(Dictionary items) { items.Clear(); } } }