public void Dispose() { using (Py.GIL()) { ps.Dispose(); ps = null; } }
public void Destroy() { if (Scope != null) { using (Py.GIL()) Scope.Dispose(); } }
private bool disposedValue = false; // To detect redundant calls protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { PyScope.Dispose(); } ytdl = null; disposedValue = true; } }