Add destructor to CMYSpellLand & CMSSpellLand
This commit is contained in:
parent
4c06ab12ea
commit
9ff0025e52
@ -231,6 +231,7 @@ bool CMSSpellLang::Load(const char *codeset, const char *userdic)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if( mLibrary != NULL ) return true; // Already loaded
|
||||
mLibrary = LoadLibrary(mEngine);
|
||||
CHECK_NULL(mLibrary, cleanup0);
|
||||
|
||||
@ -474,6 +475,8 @@ bool CMYSpellLang::Init(const gdirentry *entry)
|
||||
|
||||
bool CMYSpellLang::Load(const char *codeset, const char *)
|
||||
{
|
||||
|
||||
if (mMSpell) return mIsMdrLoaded;
|
||||
mMSpell = new Hunspell(mEngine, mDictionary);
|
||||
|
||||
if (mMSpell)
|
||||
@ -493,6 +496,7 @@ void CMYSpellLang::UnLoad()
|
||||
if (!mMSpell) return;
|
||||
delete mMSpell;
|
||||
mMSpell = NULL;
|
||||
mIsMdrLoaded = false;
|
||||
if (mToDicTable) delete mToDicTable;
|
||||
if (mToLocTable) delete mToLocTable;
|
||||
mToDicTable = mToLocTable = NULL;
|
||||
|
@ -74,6 +74,7 @@ public:
|
||||
mIsMdrLoaded = mIsUdrLoaded = false;
|
||||
mToDicTable = mToLocTable = NULL;
|
||||
}
|
||||
virtual ~CSpellLang() = 0;
|
||||
|
||||
virtual bool Load(const char *codeset, const char *userdic) = 0;
|
||||
virtual void UnLoad() = 0;
|
||||
@ -217,6 +218,7 @@ public:
|
||||
mLibrary = NULL;
|
||||
mSpellType = SCHECKET_TYPE_MSSPELL;
|
||||
}
|
||||
virtual ~CMSSpellLang(){ UnLoad(); }
|
||||
|
||||
bool Init(HKEY hKey, const char *name);
|
||||
|
||||
@ -252,6 +254,7 @@ public:
|
||||
mMSpell = NULL;
|
||||
mSpellType = SCHECKET_TYPE_MYSPELL;
|
||||
}
|
||||
virtual ~CMYSpellLang(){ UnLoad(); }
|
||||
|
||||
bool Init(const gdirentry *entry);
|
||||
|
||||
|
Reference in New Issue
Block a user