mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-19 14:39:43 -04:00
Core/Packets: Reduce memory footprint of cached queries (#22297)
Ensure only the minimum required memory is used by caching query packets by calling shrink_to_fit()
This commit is contained in:
@@ -83,6 +83,7 @@ WorldPacket GameObjectTemplate::BuildQueryData(LocaleConstant loc) const
|
||||
queryTemp.Stats.QuestItems[i] = (*items)[i];
|
||||
|
||||
queryTemp.Write();
|
||||
queryTemp.ShrinkToFit();
|
||||
return queryTemp.Move();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user