aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Capabilities/LLSD.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Capabilities/LLSD.cs')
-rw-r--r--OpenSim/Capabilities/LLSD.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Capabilities/LLSD.cs b/OpenSim/Capabilities/LLSD.cs
index 76e439f..342164d 100644
--- a/OpenSim/Capabilities/LLSD.cs
+++ b/OpenSim/Capabilities/LLSD.cs
@@ -107,17 +107,17 @@ namespace OpenSim.Framework.Capabilities
107 /// <returns></returns> 107 /// <returns></returns>
108 public static byte[] LLSDSerialize(object obj) 108 public static byte[] LLSDSerialize(object obj)
109 { 109 {
110 StringWriter sw = new StringWriter(); 110 using(StringWriter sw = new StringWriter())
111 XmlTextWriter writer = new XmlTextWriter(sw); 111 using(XmlTextWriter writer = new XmlTextWriter(sw))
112 writer.Formatting = Formatting.None; 112 {
113 113 writer.Formatting = Formatting.None;
114 writer.WriteStartElement(String.Empty, "llsd", String.Empty);
115 LLSDWriteOne(writer, obj);
116 writer.WriteEndElement();
117
118 writer.Close();
119 114
120 return Util.UTF8.GetBytes(sw.ToString()); 115 writer.WriteStartElement(String.Empty, "llsd", String.Empty);
116 LLSDWriteOne(writer, obj);
117 writer.WriteEndElement();
118 writer.Flush();
119 return Util.UTF8.GetBytes(sw.ToString());
120 }
121 } 121 }
122 122
123 /// <summary> 123 /// <summary>