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:
RoosterDragon
2023-06-11 20:24:15 +01:00
committed by abcdefg30
parent 366dc5383c
commit f794cf69f9

View File

@@ -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();
} }