Fix packetpool for ImprovedTerseObjectUpdate packets.

These were neither being returned or in many places reused.
Getting packets from a pool rather than deallocating and reallocating reduces memory churn which in turn reduces garbage collection time and frequency.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-10-11 23:58:37 +01:00
parent f5f5f2e3fb
commit 2e9ef015f7
4 changed files with 28 additions and 8 deletions

View File

@@ -420,6 +420,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
byte[] data = packet.ToBytes();
SendPacketData(udpClient, data, packet.Type, category, method);
}
PacketPool.Instance.ReturnPacket(packet);
}
/// <summary>