diff options
author | Oren Hurvitz | 2014-06-01 17:39:11 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-07-21 08:30:03 +0100 |
commit | 99ac770abbe3a95887c4b10c82f3985aa878eeef (patch) | |
tree | 8c946dab083dd50a352f3861415eca43185d8d95 /OpenSim/Region/CoreModules/Agent | |
parent | Set "[Terrain]SendTerrainUpdatesByViewDistance=true" by default. (diff) | |
download | opensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.zip opensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.gz opensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.bz2 opensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.xz |
Close streams immediately when we finish using them
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent')
-rw-r--r-- | OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index 732781a..5cdcab9 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs | |||
@@ -231,7 +231,11 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
231 | { | 231 | { |
232 | try | 232 | try |
233 | { | 233 | { |
234 | List<int> layerStarts = CSJ2K.J2kImage.GetLayerBoundaries(new MemoryStream(j2kData)); | 234 | List<int> layerStarts; |
235 | using (MemoryStream ms = new MemoryStream(j2kData)) | ||
236 | { | ||
237 | layerStarts = CSJ2K.J2kImage.GetLayerBoundaries(ms); | ||
238 | } | ||
235 | 239 | ||
236 | if (layerStarts != null && layerStarts.Count > 0) | 240 | if (layerStarts != null && layerStarts.Count > 0) |
237 | { | 241 | { |