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