ICU-12674 Add missing cleanup registration in Normalizer2; fixes memory leak.

X-SVN-Rev: 39794
This commit is contained in:
Andy Heninger 2017-03-14 18:10:59 +00:00
parent 7d82980d9a
commit c026fe4808

View File

@ -232,6 +232,7 @@ Normalizer2::getInstance(const char *packageName,
} }
} }
if(allModes==NULL) { if(allModes==NULL) {
ucln_common_registerCleanup(UCLN_COMMON_LOADED_NORMALIZER2, uprv_loaded_normalizer2_cleanup);
LocalPointer<Norm2AllModes> localAllModes( LocalPointer<Norm2AllModes> localAllModes(
Norm2AllModes::createInstance(packageName, name, errorCode)); Norm2AllModes::createInstance(packageName, name, errorCode));
if(U_SUCCESS(errorCode)) { if(U_SUCCESS(errorCode)) {