Esempio n. 1
0
        /// <inheritdoc />
        /// <summary>
        ///   Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources
        /// </summary>
        public void Dispose()
        {
            // release resources
            Alive = false;

            Duplication.Dispose();
            Duplication = null;

            Output.Dispose();
            Output = null;

            Output1?.Dispose();
            Output1 = null;

            Output6?.Dispose();
            Output6 = null;

            DxgiDevice.Dispose();
            DxgiDevice = null;

            Device.Dispose();
            Device = null;

            Texture.Dispose();
            Texture = null;

            Adapter1.Dispose();
            Adapter1 = null;
        }
Esempio n. 2
0
 public void Dispose()
 {
     _factory?.Dispose();
     _adapter?.Dispose();
     _device?.Dispose();
     _output?.Dispose();
     _output6?.Dispose();
     _duplicatedOutput?.Dispose();
     _screenTexture?.Dispose();
     GC.SuppressFinalize(this);
 }
Esempio n. 3
0
 /// <inheritdoc />
 /// <summary>
 ///   Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources
 /// </summary>
 public void Dispose()
 {
     // release resources
     Duplication.Dispose();
     Output.Dispose();
     Output1?.Dispose();
     Output6?.Dispose();
     Context.Dispose();
     DxgiDevice.Dispose();
     Device.Dispose();
     Texture.Dispose();
     Adapter1.Dispose();
 }