diff --git a/src/main.cpp b/src/main.cpp index fb68e1a2..240e7480 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -258,6 +259,7 @@ int MSE::OnExit() { thumbnail_thread.abortAll(); settings.write(); package_manager.destroy(); + SpellChecker::destroyAll(); return 0; } diff --git a/src/util/spell_checker.cpp b/src/util/spell_checker.cpp index f46b9f3d..e3b533d1 100644 --- a/src/util/spell_checker.cpp +++ b/src/util/spell_checker.cpp @@ -39,7 +39,7 @@ SpellChecker::SpellChecker(const char* aff_path, const char* dic_path) , encoding(String(get_dic_encoding(), IF_UNICODE(wxConvLibc, wxSTRING_MAXLEN))) {} -void SpellChecker::destroy() { +void SpellChecker::destroyAll() { spellers.clear(); } diff --git a/src/util/spell_checker.hpp b/src/util/spell_checker.hpp index 57d9453f..e2831721 100644 --- a/src/util/spell_checker.hpp +++ b/src/util/spell_checker.hpp @@ -23,7 +23,7 @@ class SpellChecker : public Hunspell, public IntrusivePtrBase { /** Note: This is not threadsafe yet */ static SpellChecker& get(const String& language); /// Destroy all cached SpellChecker objects - static void destroy(); + static void destroyAll(); /// Check the spelling of a single word bool spell(const String& word);