public void Dispose() { if (_session != null) { _session.Disposed -= OnSessionDisposed; _session.Dispose(); _session = null; } }
internal async Task ReleaseSession(IRSession session) { if (session == null) { return; } await _sem.WaitAsync(); if (_disposed || _freeSessions.Count >= MaxFreeSessions || !session.IsHostRunning) { session.Dispose(); } else { _freeSessions.Add(session); } _sem.Release(); }
public void Dispose() { _workflow.RSession.Mutated -= OnInteractiveSessionMutated; Session?.Dispose(); Session = null; }
public void Dispose() => _session?.Dispose();
public void Dispose() { _evaluation.Dispose(); _session.StopHostAsync().ContinueWith(t => _session.Dispose()); }