mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
dispose some MemoryStreams
This commit is contained in:
@@ -368,9 +368,6 @@ namespace OpenSim.Capabilities.Handlers
|
||||
try
|
||||
{
|
||||
// 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)
|
||||
{
|
||||
@@ -412,10 +409,7 @@ namespace OpenSim.Capabilities.Handlers
|
||||
managedImage.Clear();
|
||||
|
||||
if (imgstream != null)
|
||||
{
|
||||
imgstream.Close();
|
||||
imgstream.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user