mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Fixed a few minor hunspell leaks
This commit is contained in:
parent
c6a4d4bc7f
commit
17f400be35
@ -5836,6 +5836,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
if (result == DialogResult.No)
|
||||
{
|
||||
_spellCheckForm.Dispose();
|
||||
_spellCheckForm = new SpellCheck();
|
||||
_spellCheckForm.DoSpellCheck(autoDetect, _subtitle, dictionaryFolder, this, startFromLine);
|
||||
}
|
||||
|
15
src/Forms/SpellCheck.Designer.cs
generated
15
src/Forms/SpellCheck.Designer.cs
generated
@ -5,20 +5,7 @@
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </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);
|
||||
}
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
|
@ -320,6 +320,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private void LoadHunspell(string dictionary)
|
||||
{
|
||||
_currentDictionary = dictionary;
|
||||
if (_hunspell != null)
|
||||
_hunspell.Dispose();
|
||||
_hunspell = Hunspell.GetHunspell(dictionary);
|
||||
}
|
||||
|
||||
@ -1292,5 +1294,23 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
PrepareNextWord();
|
||||
}
|
||||
|
||||
/// <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))
|
||||
{
|
||||
if (_hunspell != null)
|
||||
{
|
||||
_hunspell.Dispose();
|
||||
_hunspell = null;
|
||||
}
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user