/// <summary> /// Raises the <see cref="E:System.Windows.Forms.Form.FormClosing" /> event. /// </summary> /// <param name="e">A <see cref="T:System.Windows.Forms.FormClosingEventArgs" /> that contains the event data.</param> protected override void OnFormClosing(FormClosingEventArgs e) { base.OnFormClosing(e); GorgonApplication.IdleMethod = null; _sobel?.Dispose(); _sobelShader?.Dispose(); _outputTexture?.Dispose(); _sourceTexture?.Texture?.Dispose(); _renderer?.Dispose(); _graphics?.Dispose(); }