summaryrefslogtreecommitdiff
path: root/plugins/SpellChecker/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-17 15:06:11 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-17 15:06:11 +0000
commit82ae452fff08430d514f762f49e78fec90f88625 (patch)
tree184c31c029a364eec13b58d060d20ba85b2a20bc /plugins/SpellChecker/src
parent15267ea2d489606fb4b99d011bc3ea7c2a644a9f (diff)
- rest of memory leaks
- code cleaning; git-svn-id: http://svn.miranda-ng.org/main/trunk@4078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker/src')
-rw-r--r--plugins/SpellChecker/src/dictionary.cpp7
-rw-r--r--plugins/SpellChecker/src/dictionary.h20
2 files changed, 15 insertions, 12 deletions
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp
index 5ef89dae92..aeb03b4b86 100644
--- a/plugins/SpellChecker/src/dictionary.cpp
+++ b/plugins/SpellChecker/src/dictionary.cpp
@@ -984,12 +984,15 @@ void GetAvaibleDictionaries(LIST<Dictionary> &dicts, TCHAR *path, TCHAR *user_pa
void FreeDictionaries(LIST<Dictionary> &dicts)
{
for (int i = 0; i < dicts.getCount(); i++)
- {
delete dicts[i];
- }
+
dicts.destroy();
}
+Dictionary::~Dictionary()
+{
+ delete autoReplace;
+}
// Free the list returned by GetAvaibleDictionaries
void FreeSuggestions(Suggestions &suggestions)
diff --git a/plugins/SpellChecker/src/dictionary.h b/plugins/SpellChecker/src/dictionary.h
index 3add2d739c..09902435f6 100644
--- a/plugins/SpellChecker/src/dictionary.h
+++ b/plugins/SpellChecker/src/dictionary.h
@@ -40,35 +40,35 @@ public:
AutoReplaceMap *autoReplace;
HANDLE hIcolib;
- virtual ~Dictionary() {}
+ virtual ~Dictionary();
// Return TRUE if the word is correct
- virtual BOOL spell(const TCHAR *) =0;
+ virtual BOOL spell(const TCHAR *) = 0;
// Return a list of suggestions to a word
- virtual Suggestions suggest(const TCHAR * word) =0;
+ virtual Suggestions suggest(const TCHAR * word) = 0;
// Return a list of auto suggestions to a word
- virtual Suggestions autoSuggest(const TCHAR * word) =0;
+ virtual Suggestions autoSuggest(const TCHAR * word) = 0;
// Return a auto suggestions to a word
// You have to free the item
- virtual TCHAR * autoSuggestOne(const TCHAR * word) =0;
+ virtual TCHAR * autoSuggestOne(const TCHAR * word) = 0;
// Return TRUE if the char is a word char
- virtual BOOL isWordChar(TCHAR c) =0;
+ virtual BOOL isWordChar(TCHAR c) = 0;
// Add a word to the user custom dict
- virtual void addWord(const TCHAR * word) =0;
+ virtual void addWord(const TCHAR * word) = 0;
// Add a word to the list of ignored words
- virtual void ignoreWord(const TCHAR * word) =0;
+ virtual void ignoreWord(const TCHAR * word) = 0;
// Assert that all needed data is loaded
- virtual void load() =0;
+ virtual void load() = 0;
// Return TRUE if the dict is fully loaded
- virtual BOOL isLoaded() =0;
+ virtual BOOL isLoaded() = 0;
};