mirror of https://github.com/kiwix/libkiwix.git
+ delete a pointer
This commit is contained in:
parent
3e24b168da
commit
dbbab7622e
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue