Add TrimExcess to TypeDictionary.
After adding is finished, this can be used to reduce the memory footprint of the dictionary.
This commit is contained in:
@@ -97,6 +97,12 @@ namespace OpenRA.Primitives
|
||||
data.Remove(t);
|
||||
}
|
||||
|
||||
public void TrimExcess()
|
||||
{
|
||||
foreach (var objs in data.Values)
|
||||
objs.TrimExcess();
|
||||
}
|
||||
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return WithInterface<object>().GetEnumerator();
|
||||
|
||||
Reference in New Issue
Block a user