Add warning chevrons around the GC.Collect added to Warp3DImageModule in commit 5eb2526

Manually calling GC.Collect() really shouldnt' be necessary and is generally regarded as a bad idea.
A GC should occur anyway pretty shortly afterwards.
However, can leave this in development code for now to see if it does actually make a significant difference rather than simply doing a GC a little earlier.
integration
Justin Clark-Casey (justincc) 2012-09-07 00:46:24 +01:00
parent d2b00749ef
commit 288baaecaf
1 changed files with 4 additions and 0 deletions

View File

@ -208,6 +208,10 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
bitmap = ImageUtils.ResizeImage(origBitmap, viewport.Width, viewport.Height);
}
// XXX: It shouldn't really be necesary to force a GC here as one should occur anyway pretty shortly
// afterwards. It's generally regarded as a bad idea to manually GC. If Warp3D is using lots of memory
// then this may be some issue with the Warp3D code itself, though it's also quite possible that generating
// this map tile simply takes a lot of memory.
GC.Collect();
m_log.Debug("[WARP 3D IMAGE MODULE]: GC.Collect()");