diff options
author | Oren Hurvitz | 2014-06-01 17:39:11 +0300 |
---|---|---|
committer | Justin Clark-Casey | 2014-08-02 00:55:57 +0100 |
commit | e41e52e09727842d990a31e2a5f7f3e9c88fe8b3 (patch) | |
tree | 5779c9f42cd913f63e2d237b5a407214933585db /OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs | |
parent | Add code to GridService to check for overlapping of varregions (diff) | |
download | opensim-SC_OLD-e41e52e09727842d990a31e2a5f7f3e9c88fe8b3.zip opensim-SC_OLD-e41e52e09727842d990a31e2a5f7f3e9c88fe8b3.tar.gz opensim-SC_OLD-e41e52e09727842d990a31e2a5f7f3e9c88fe8b3.tar.bz2 opensim-SC_OLD-e41e52e09727842d990a31e2a5f7f3e9c88fe8b3.tar.xz |
Close streams immediately when we finish using them
Diffstat (limited to '')
-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 | { |