This method is implemented to support the IDictionary interface.
ICollection<TKey>.Count gets set to zero, and references to other objects from elements of the collection are also released. The capacity remains unchanged.