Exemplo n.º 1
0
        public void Dispose()
        {
            if (BaseConstants.DEV_DEBUG)
            {
                Debug.LogWarning("Dispose called!");
            }

            if (Handle != IntPtr.Zero)
            {
                NativeMethods.CloseHandle(Handle);
            }

            if (threadHandle != IntPtr.Zero)
            {
                NativeMethods.CloseHandle(threadHandle);
            }

            Handle       = IntPtr.Zero;
            threadHandle = IntPtr.Zero;
            Id           = 0;

            isBusy    = false;
            HasExited = true;

            if (StandardOutput != null)
            {
                StandardOutput.Dispose();
            }

            if (StandardError != null)
            {
                StandardError.Dispose();
            }
        }
Exemplo n.º 2
0
        public void Dispose()
        {
            if (!_disposed)
            {
                _disposed = true;

                StandardInput?.Dispose();
                StandardOutput?.Dispose();
                StandardError?.Dispose();
                winpty_free(_handle);

                StandardInput  = null;
                StandardOutput = null;
                StandardError  = null;
                _handle        = IntPtr.Zero;
            }
        }
Exemplo n.º 3
0
        public void Dispose()
        {
            if (BaseConstants.DEV_DEBUG)
            {
                Debug.LogWarning("Dispose called!");
            }

            Id        = 0;
            isBusy    = false;
            HasExited = true;

            if (StandardOutput != null)
            {
                StandardOutput.Dispose();
            }

            if (StandardError != null)
            {
                StandardError.Dispose();
            }
        }
Exemplo n.º 4
0
 private void CloseStreams()
 {
     StandardInput?.Dispose();
     StandardOutput?.Dispose();
     StandardError?.Dispose();
 }