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