mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 10:15:33 +08:00
dispose some MemoryStreams
This commit is contained in:
@@ -362,8 +362,6 @@ namespace OpenSim.Capabilities.Handlers
|
||||
{
|
||||
// Taking our jpeg2000 data, decoding it, then saving it to a byte array with regular data
|
||||
|
||||
imgstream = new MemoryStream();
|
||||
|
||||
// Decode image to System.Drawing.Image
|
||||
if (OpenJPEG.DecodeToImage(texture.Data, out managedImage, out image) && image != null)
|
||||
{
|
||||
@@ -404,10 +402,7 @@ namespace OpenSim.Capabilities.Handlers
|
||||
if(managedImage != null)
|
||||
managedImage.Clear();
|
||||
if (imgstream != null)
|
||||
{
|
||||
imgstream.Close();
|
||||
imgstream.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user