Ejemplo n.º 1
0
        public void When_dictionary_is_cleared_Then_it_is_empty()
        {
            var dict = new WeakValueDictionary <int, Item> {
                [0] = null,
                [1] = new Item()
            };

            dict.Clear();

            Assert.That(dict.Count, Is.Zero);
        }
Ejemplo n.º 2
0
        public void Dispose()
        {
//			foreach (KeyValuePair<string, T> pair in pool)
//			{
//				T o = pair.Value;
//				if (o != null)
//				{
//					o.DestroyEx();
//				}
//			}
            pool.Clear();
        }