fix: Eliminates List allocations in various places. (#2158)

This commit is contained in:
Kamron Batman 2025-11-16 18:33:53 -08:00 committed by GitHub
parent 6f64cddd0b
commit 4836bff5eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 263 additions and 200 deletions

View file

@ -870,7 +870,7 @@ namespace Server.Gumps
}
var items = house.GetItems();
var mobiles = house.GetMobiles();
using var mobiles = house.GetMobilesPooled();
newHouse.MoveToWorld(
new Point3D(
@ -1216,7 +1216,7 @@ namespace Server.Gumps
);
var r = m_House.Region;
var list = r.GetMobiles();
using var list = r.GetMobilesPooled();
for (var i = 0; i < list.Count; ++i)
{
@ -1258,7 +1258,7 @@ namespace Server.Gumps
}
var r = m_House.Region;
var list = r.GetMobiles();
using var list = r.GetMobilesPooled();
for (var i = 0; i < list.Count; ++i)
{