public virtual void Dispose(bool disposeManagedResources) { if (!_Disposed) { if (disposeManagedResources) { if (_Reference != 0) { _Interpreter.dispose(_Reference); } } _Interpreter = null; _Disposed = true; } }
public virtual void Dispose(bool disposeManagedResources) { if (!_Disposed) { if (_Reference != 0 && _Interpreter != null) { if (disposeManagedResources) { _Interpreter.dispose(_Reference); _Reference = 0; } else if (_Interpreter.L != IntPtr.Zero) { _Reference = 0; } } _Interpreter = null; _Disposed = true; } }
protected virtual void Dispose(bool disposeManagedResources) { if (!_Disposed) { if (_Reference != 0 && _Interpreter != null) { if (disposeManagedResources) { _Interpreter.dispose(_Reference); _Reference = 0; } else if (_Interpreter.L != IntPtr.Zero) { LuaScriptMgr._refGCList.Enqueue(new LuaRef(_Interpreter.L, _Reference)); _Reference = 0; } } _Interpreter = null; _Disposed = true; } }
public virtual void Dispose(bool disposeManagedResources) { if (!_Disposed) { if (_Reference != 0 && _Interpreter != null) { if (disposeManagedResources) { _Interpreter.dispose(_Reference); } else { LuaScriptMgr mgr = LuaScriptMgr.GetMgrFromLuaState(_Interpreter.L); mgr.refGCList.Enqueue(_Reference); } _Reference = 0; } _Interpreter = null; _Disposed = true; } }