Comment out SceneViewer.Reset() and stop calling from Close() since this is useless work as a closed scene object is never reset.
Strictly speaking, we could also stop bothering to clear the m_updateTimes and m_partsUpdateQueue if we are sure that the whole SceneViewer is shortly to be garbage collected anyway, but we'll leave them around for now.remove-scene-viewer
parent
405a5b097b
commit
3d4d3427cd
|
@ -193,37 +193,38 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
if (m_pendingObjects == null)
|
||||
return;
|
||||
|
||||
lock (m_pendingObjects)
|
||||
{
|
||||
if (m_pendingObjects != null)
|
||||
{
|
||||
m_pendingObjects.Clear();
|
||||
m_pendingObjects = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
// public void Reset()
|
||||
// {
|
||||
// if (m_pendingObjects == null)
|
||||
// return;
|
||||
//
|
||||
// lock (m_pendingObjects)
|
||||
// {
|
||||
// if (m_pendingObjects != null)
|
||||
// {
|
||||
// m_pendingObjects.Clear();
|
||||
// m_pendingObjects = null;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
public void Close()
|
||||
{
|
||||
lock (m_pendingObjects)
|
||||
{
|
||||
// We perform this under the m_pendingObjects lock in order to avoid a race condition with another
|
||||
// thread on SendPrimUpdates()
|
||||
IsEnabled = false;
|
||||
|
||||
lock (m_updateTimes)
|
||||
{
|
||||
m_updateTimes.Clear();
|
||||
}
|
||||
|
||||
lock (m_partsUpdateQueue)
|
||||
{
|
||||
m_partsUpdateQueue.Clear();
|
||||
}
|
||||
|
||||
Reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue