Exemple #1
0
 public void Dispose()
 {
     using (Py.GIL())
     {
         ps.Dispose();
         ps = null;
     }
 }
 public void Destroy()
 {
     if (Scope != null)
     {
         using (Py.GIL())
             Scope.Dispose();
     }
 }
Exemple #3
0
        private bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    PyScope.Dispose();
                }

                ytdl = null;

                disposedValue = true;
            }
        }