/* * \param indexp */ void ISpellChecker::clearindex(struct flagptr *indexp) { register int i; for(i = 0; i < SET_SIZE + m_hashheader.nstrchars; i++, indexp++) { if(indexp->numents == 0 && indexp->pu.fp != NULL) { clearindex(indexp->pu.fp); free(indexp->pu.fp); } } }
ISpellChecker::~ISpellChecker() { if (m_bSuccessfulInit) { // only cleanup our mess if we were successfully initialized clearindex (m_pflagindex); clearindex (m_sflagindex); } FREEP(m_hashtbl); FREEP(m_hashstrings); FREEP(m_sflaglist); FREEP(m_chartypes); if (g_iconv_is_valid (m_translate_in )) g_iconv_close(m_translate_in); m_translate_in = G_ICONV_INVALID; if (g_iconv_is_valid(m_translate_out)) g_iconv_close(m_translate_out); m_translate_out = G_ICONV_INVALID; }