diff options
author | UbitUmarov | 2016-08-22 05:47:19 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-22 05:47:19 +0100 |
commit | 52a80f17423afc0049117c812cacab159f544639 (patch) | |
tree | 23f0f3fcbf53b66b311fde7f4787b6cf2bf20420 /OpenSim/Services/Connectors/Hypergrid | |
parent | workaround potencial memory leak (diff) | |
download | opensim-SC_OLD-52a80f17423afc0049117c812cacab159f544639.zip opensim-SC_OLD-52a80f17423afc0049117c812cacab159f544639.tar.gz opensim-SC_OLD-52a80f17423afc0049117c812cacab159f544639.tar.bz2 opensim-SC_OLD-52a80f17423afc0049117c812cacab159f544639.tar.xz |
workaround potencial memory leak
Diffstat (limited to 'OpenSim/Services/Connectors/Hypergrid')
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index 2340998..aad3bd2 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | |||
@@ -159,8 +159,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
159 | string filename = string.Empty; | 159 | string filename = string.Empty; |
160 | 160 | ||
161 | try | 161 | try |
162 | { | 162 | { |
163 | WebClient c = new WebClient(); | ||
164 | //m_log.Debug("JPEG: " + imageURL); | 163 | //m_log.Debug("JPEG: " + imageURL); |
165 | string name = regionID.ToString(); | 164 | string name = regionID.ToString(); |
166 | filename = Path.Combine(storagePath, name + ".jpg"); | 165 | filename = Path.Combine(storagePath, name + ".jpg"); |
@@ -168,7 +167,8 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
168 | if (!File.Exists(filename)) | 167 | if (!File.Exists(filename)) |
169 | { | 168 | { |
170 | m_log.DebugFormat("[GATEKEEPER SERVICE CONNECTOR]: downloading..."); | 169 | m_log.DebugFormat("[GATEKEEPER SERVICE CONNECTOR]: downloading..."); |
171 | c.DownloadFile(imageURL, filename); | 170 | using(WebClient c = new WebClient()) |
171 | c.DownloadFile(imageURL, filename); | ||
172 | } | 172 | } |
173 | else | 173 | else |
174 | { | 174 | { |