In TypeDictionary.TrimExcess, also TrimExcess on the internal data dictionary size.
As TypeDictionary instances tend to live a long time without edits after being initially populated, this will reduce their long term memory footprint.
This commit is contained in:
@@ -101,6 +101,7 @@ namespace OpenRA.Primitives
|
|||||||
|
|
||||||
public void TrimExcess()
|
public void TrimExcess()
|
||||||
{
|
{
|
||||||
|
data.TrimExcess();
|
||||||
foreach (var objs in data.Values)
|
foreach (var objs in data.Values)
|
||||||
objs.TrimExcess();
|
objs.TrimExcess();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user