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); }
public void Dispose() { // foreach (KeyValuePair<string, T> pair in pool) // { // T o = pair.Value; // if (o != null) // { // o.DestroyEx(); // } // } pool.Clear(); }