aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers
diff options
context:
space:
mode:
authorUbitUmarov2017-05-06 15:57:47 +0100
committerUbitUmarov2017-05-06 15:57:47 +0100
commitae191cd3042fec6b753b41b19907d236690a70cf (patch)
treeaaaebcba691cef51e12e98af8b4b9d3d3b31c4bf /OpenSim/Server/Handlers
parent fix a few wrong placement ( this is a test by the way ) (diff)
downloadopensim-SC_OLD-ae191cd3042fec6b753b41b19907d236690a70cf.zip
opensim-SC_OLD-ae191cd3042fec6b753b41b19907d236690a70cf.tar.gz
opensim-SC_OLD-ae191cd3042fec6b753b41b19907d236690a70cf.tar.bz2
opensim-SC_OLD-ae191cd3042fec6b753b41b19907d236690a70cf.tar.xz
dispose some MemoryStreams
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r--OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs b/OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs
index f292b95..ffd8ef6 100644
--- a/OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs
+++ b/OpenSim/Server/Handlers/Map/MapRemoveServerConnector.cs
@@ -215,13 +215,16 @@ namespace OpenSim.Server.Handlers.MapImage
215 215
216 private byte[] DocToBytes(XmlDocument doc) 216 private byte[] DocToBytes(XmlDocument doc)
217 { 217 {
218 MemoryStream ms = new MemoryStream(); 218 using(MemoryStream ms = new MemoryStream())
219 XmlTextWriter xw = new XmlTextWriter(ms, null); 219 {
220 xw.Formatting = Formatting.Indented; 220 using(XmlTextWriter xw = new XmlTextWriter(ms,null))
221 doc.WriteTo(xw); 221 {
222 xw.Flush(); 222 xw.Formatting = Formatting.Indented;
223 223 doc.WriteTo(xw);
224 xw.Flush();
225 }
224 return ms.ToArray(); 226 return ms.ToArray();
227 }
225 } 228 }
226 229
227 private System.Net.IPAddress GetCallerIP(IOSHttpRequest request) 230 private System.Net.IPAddress GetCallerIP(IOSHttpRequest request)