Yengine script, don't dispose twice
parent
20d77d3905
commit
7d7fc8f06a
|
@ -61,10 +61,12 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||||
public partial class XMRInstance
|
public partial class XMRInstance
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private bool m_disposed;
|
||||||
// In case Dispose() doesn't get called, we want to be sure to clean
|
// In case Dispose() doesn't get called, we want to be sure to clean
|
||||||
// up. This makes sure we decrement m_CompiledScriptRefCount.
|
// up. This makes sure we decrement m_CompiledScriptRefCount.
|
||||||
~XMRInstance()
|
~XMRInstance()
|
||||||
{
|
{
|
||||||
|
if(!m_disposed)
|
||||||
Dispose();
|
Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,6 +92,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||||
// Let script methods get garbage collected if no one else is using
|
// Let script methods get garbage collected if no one else is using
|
||||||
// them.
|
// them.
|
||||||
DecObjCodeRefCount();
|
DecObjCodeRefCount();
|
||||||
|
m_disposed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DecObjCodeRefCount()
|
private void DecObjCodeRefCount()
|
||||||
|
|
Loading…
Reference in New Issue