2
RegexMatcher (icu api에서)를 사용할 때 메모리가 릴리즈되지 않습니다. 재설정을 수행 한 후에도 메모리가 해제되지 않습니다. 재설정 할 때마다 더 많은 메모리가 손실됩니다 (inputBuffer는 UnicodeString 임).icu RegexMatcher 메모리가 해제되지 않았습니다.
은 내가
어떤 아이디어를주십시오 누락 무슨 ... 그냥 메모리 누수 삭제 한 다음 새 RegexMatcher 객체를 생성하고 것 같다? 중환자 문서 숨겨져
가UErrorCode matcherStatus = U_ZERO_ERROR;
RegexMatcher * lastWordMatcher = new RegexMatcher(".*(^|\\p{Z})(\\S+)$", UREGEX_ERROR_ON_UNKNOWN_ESCAPES | UREGEX_UWORD, matcherStatus);
UnicodeString lastWord;
lastWordMatcher->reset(inputBuffer);
if (lastWordMatcher->find(matcherStatus))
{
lastWord = lastWordMatcher->group(2, matcherStatus);
}
delete lastWordFinder;