/// <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; }
public void Dispose() { _factory?.Dispose(); _adapter?.Dispose(); _device?.Dispose(); _output?.Dispose(); _output6?.Dispose(); _duplicatedOutput?.Dispose(); _screenTexture?.Dispose(); GC.SuppressFinalize(this); }
/// <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(); }