mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +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)
|
if (result == DialogResult.No)
|
||||||
{
|
{
|
||||||
|
_spellCheckForm.Dispose();
|
||||||
_spellCheckForm = new SpellCheck();
|
_spellCheckForm = new SpellCheck();
|
||||||
_spellCheckForm.DoSpellCheck(autoDetect, _subtitle, dictionaryFolder, this, startFromLine);
|
_spellCheckForm.DoSpellCheck(autoDetect, _subtitle, dictionaryFolder, this, startFromLine);
|
||||||
}
|
}
|
||||||
|
13
src/Forms/SpellCheck.Designer.cs
generated
13
src/Forms/SpellCheck.Designer.cs
generated
@ -7,19 +7,6 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
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
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -320,6 +320,8 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
private void LoadHunspell(string dictionary)
|
private void LoadHunspell(string dictionary)
|
||||||
{
|
{
|
||||||
_currentDictionary = dictionary;
|
_currentDictionary = dictionary;
|
||||||
|
if (_hunspell != null)
|
||||||
|
_hunspell.Dispose();
|
||||||
_hunspell = Hunspell.GetHunspell(dictionary);
|
_hunspell = Hunspell.GetHunspell(dictionary);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1292,5 +1294,23 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
PrepareNextWord();
|
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