Zero out PrimitiveBaseShape.SculptData after the JPEG2000 data has been decoded to allow garbage collection on it
parent
b4526a5a6d
commit
2f2eeb6731
|
@ -289,6 +289,9 @@ namespace OpenSim.Region.Physics.Meshing
|
||||||
ManagedImage managedImage; // we never use this
|
ManagedImage managedImage; // we never use this
|
||||||
OpenJPEG.DecodeToImage(primShape.SculptData, out managedImage, out idata);
|
OpenJPEG.DecodeToImage(primShape.SculptData, out managedImage, out idata);
|
||||||
|
|
||||||
|
// Remove the reference to the encoded JPEG2000 data so it can be GCed
|
||||||
|
primShape.SculptData = Utils.EmptyBytes;
|
||||||
|
|
||||||
if (cacheSculptMaps)
|
if (cacheSculptMaps)
|
||||||
{
|
{
|
||||||
try { idata.Save(decodedSculptFileName, ImageFormat.MemoryBmp); }
|
try { idata.Save(decodedSculptFileName, ImageFormat.MemoryBmp); }
|
||||||
|
|
Loading…
Reference in New Issue