]> git.lyx.org Git - lyx.git/blobdiff - src/WordList.cpp
tex2lyx/text.cpp: whitespace fix
[lyx.git] / src / WordList.cpp
index 2f8ce2bd524848245933ab5a2dad624235517f20..191dc33b83ebc365a166ead16bd0dffa47091bde 100644 (file)
@@ -30,6 +30,7 @@ namespace lyx {
 ///
 map<Language, WordList *> theGlobalWordList;
 
+
 WordList * theWordList(Language const & lang)
 {
        map<Language, WordList *>::iterator it = theGlobalWordList.find(lang);
@@ -40,6 +41,15 @@ WordList * theWordList(Language const & lang)
        return theGlobalWordList[lang];
 }
 
+
+void WordList::cleanupWordLists() {
+       map<Language, WordList *>::const_iterator it = theGlobalWordList.begin();
+       for (; it != theGlobalWordList.end(); ++it)
+               delete it->second;
+       theGlobalWordList.clear();
+}
+
+
 ///
 struct WordList::Impl {
        ///