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()
|
// public void Reset()
|
||||||
{
|
// {
|
||||||
if (m_pendingObjects == null)
|
// if (m_pendingObjects == null)
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
lock (m_pendingObjects)
|
// lock (m_pendingObjects)
|
||||||
{
|
// {
|
||||||
if (m_pendingObjects != null)
|
// if (m_pendingObjects != null)
|
||||||
{
|
// {
|
||||||
m_pendingObjects.Clear();
|
// m_pendingObjects.Clear();
|
||||||
m_pendingObjects = null;
|
// m_pendingObjects = null;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
lock (m_pendingObjects)
|
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;
|
IsEnabled = false;
|
||||||
|
|
||||||
lock (m_updateTimes)
|
lock (m_updateTimes)
|
||||||
{
|
{
|
||||||
m_updateTimes.Clear();
|
m_updateTimes.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
lock (m_partsUpdateQueue)
|
lock (m_partsUpdateQueue)
|
||||||
{
|
{
|
||||||
m_partsUpdateQueue.Clear();
|
m_partsUpdateQueue.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
Reset();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue