Update Project

This commit is contained in:
2026-03-20 13:04:43 +02:00
parent 9b587e6cba
commit beae2dea89
2295 changed files with 251259 additions and 33 deletions
@@ -0,0 +1,32 @@
using System.Collections.Generic;
using ModestTree;
namespace Zenject
{
public class DictionaryPool<TKey, TValue> : StaticMemoryPool<Dictionary<TKey, TValue>>
{
static DictionaryPool<TKey, TValue> _instance = new DictionaryPool<TKey, TValue>();
public DictionaryPool()
{
OnSpawnMethod = OnSpawned;
OnDespawnedMethod = OnDespawned;
}
public static DictionaryPool<TKey, TValue> Instance
{
get { return _instance; }
}
static void OnSpawned(Dictionary<TKey, TValue> items)
{
Assert.That(items.IsEmpty());
}
static void OnDespawned(Dictionary<TKey, TValue> items)
{
items.Clear();
}
}
}