Use Util.UTF8 instead of creating a new heap object every time.

prioritization
Diva Canto 2009-10-10 06:35:31 -07:00
parent 3f78ff6ee0
commit 8030ed89b0
1 changed files with 5 additions and 5 deletions

View File

@ -90,7 +90,7 @@ namespace OpenSim.Framework.Communications.Clients
try
{
strBuffer = OSDParser.SerializeJsonString(args);
UTF8Encoding str = new UTF8Encoding();
Encoding str = Util.UTF8;
buffer = str.GetBytes(strBuffer);
}
@ -218,7 +218,7 @@ namespace OpenSim.Framework.Communications.Clients
try
{
strBuffer = OSDParser.SerializeJsonString(args);
UTF8Encoding str = new UTF8Encoding();
Encoding str = Util.UTF8;
buffer = str.GetBytes(strBuffer);
}
@ -459,7 +459,7 @@ namespace OpenSim.Framework.Communications.Clients
try
{
strBuffer = OSDParser.SerializeJsonString(args);
UTF8Encoding str = new UTF8Encoding();
Encoding str = Util.UTF8;
buffer = str.GetBytes(strBuffer);
}
@ -543,7 +543,7 @@ namespace OpenSim.Framework.Communications.Clients
try
{
strBuffer = OSDParser.SerializeJsonString(args);
UTF8Encoding str = new UTF8Encoding();
Encoding str = Util.UTF8;
buffer = str.GetBytes(strBuffer);
}
@ -637,7 +637,7 @@ namespace OpenSim.Framework.Communications.Clients
try
{
strBuffer = OSDParser.SerializeJsonString(args);
UTF8Encoding str = new UTF8Encoding();
Encoding str = Util.UTF8;
buffer = str.GetBytes(strBuffer);
}