+ delete a pointer

This commit is contained in:
kelson42 2012-09-05 17:55:18 +00:00
parent 3e24b168da
commit dbbab7622e
2 changed files with 3 additions and 2 deletions

View File

@ -225,7 +225,7 @@ namespace kiwix {
} }
/* Make a hard-disk flush every 10.000 articles */ /* Make a hard-disk flush every 10.000 articles */
if (indexedArticleCount % 5000 == 0) { if (indexedArticleCount % 500 == 0) {
self->flush(); self->flush();
} }

View File

@ -71,6 +71,7 @@ std::string kiwix::removeAccents(const std::string &text) {
Transliterator *removeAccentsTrans = Transliterator::createInstance("Lower; NFD; [:M:] remove; NFC", UTRANS_FORWARD, status); Transliterator *removeAccentsTrans = Transliterator::createInstance("Lower; NFD; [:M:] remove; NFC", UTRANS_FORWARD, status);
UnicodeString ustring = UnicodeString(text.c_str()); UnicodeString ustring = UnicodeString(text.c_str());
removeAccentsTrans->transliterate(ustring); removeAccentsTrans->transliterate(ustring);
delete removeAccentsTrans;
std::string unaccentedText; std::string unaccentedText;
ustring.toUTF8String(unaccentedText); ustring.toUTF8String(unaccentedText);
return unaccentedText; return unaccentedText;