Add Dispose method to LayoutPicker.cs

The Dispose method has been added to LayoutPicker.cs for properly disposing the managed resources. As part of the changes, the existing Dispose method from LayoutPicker.Designer.cs was removed and integrated into the new method, ensuring more optimized disposal of resources.

Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
This commit is contained in:
Ivandro Jao 2024-06-27 16:43:47 +01:00
parent 673b25cb5c
commit 759b6fcaa8
2 changed files with 26 additions and 13 deletions

View File

@ -7,19 +7,6 @@
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>

View File

@ -535,5 +535,31 @@ namespace Nikse.SubtitleEdit.Forms
{
ShowVideoControls = checkBoxHideVideoControls.Checked;
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing)
{
_gray1?.Dispose();
_gray2?.Dispose();
_gray3?.Dispose();
_gray4?.Dispose();
_gray5?.Dispose();
_gray6?.Dispose();
_gray7?.Dispose();
_gray8?.Dispose();
_gray9?.Dispose();
_gray10?.Dispose();
_gray11?.Dispose();
_gray12?.Dispose();
components?.Dispose();
}
base.Dispose(disposing);
}
}
}