mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 16:39:08 +01: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:
@@ -413,6 +413,11 @@ class TC_SHARED_API ByteBuffer
|
||||
_storage.reserve(ressize);
|
||||
}
|
||||
|
||||
void shrink_to_fit()
|
||||
{
|
||||
_storage.shrink_to_fit();
|
||||
}
|
||||
|
||||
void append(const char *src, size_t cnt)
|
||||
{
|
||||
return append((const uint8 *)src, cnt);
|
||||
|
||||
Reference in New Issue
Block a user