public void Dispose() { try { _mousePointer?.Dispose(); } catch { } finally { _mousePointer = null; } try { _editorSession.Dispose(); } catch { } finally { _editorSession = null; } try { _duplCapture.Dispose(); } catch { } finally { _duplCapture = null; } try { _desktopImageTexture.Dispose(); } catch { } finally { _desktopImageTexture = null; } try { _stagingTexture.Dispose(); } catch { } finally { _stagingTexture = null; } try { _device.Dispose(); } catch { } finally { _device = null; } try { _deviceForDeskDupl.Dispose(); } catch { } finally { _deviceForDeskDupl = null; } }
public void Dispose() { try { _duplCapture?.Dispose(); _desktopImageTexture?.Dispose(); _device?.Dispose(); } catch { } }
public void Dispose() { try { _mousePointer?.Dispose(); } catch { } finally { _mousePointer = null; } try { _duplCapture.Dispose(); } catch { } finally { _duplCapture = null; } try { _editorSession.Dispose(); } catch { } finally { _editorSession = null; } }
public void Dispose() { try { _duplCapture.Dispose(); } catch { } finally { _duplCapture = null; } // Mouse Pointer disposed later to prevent errors. try { _mousePointer?.Dispose(); } catch { } finally { _mousePointer = null; } try { _editorSession.Dispose(); } catch { } finally { _editorSession = null; } }