mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-2135 service memory leaks
X-SVN-Rev: 10478
This commit is contained in:
parent
685aa28a20
commit
a382d860fa
3 changed files with 10 additions and 4 deletions
|
@ -85,9 +85,12 @@ class U_COMMON_API ICUNotifier : public UMemory {
|
|||
}
|
||||
|
||||
virtual ~ICUNotifier(void) {
|
||||
Mutex lmx(¬ifyLock);
|
||||
delete listeners;
|
||||
listeners = NULL;
|
||||
{
|
||||
Mutex lmx(¬ifyLock);
|
||||
delete listeners;
|
||||
listeners = NULL;
|
||||
}
|
||||
umtx_destroy(¬ifyLock);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -716,6 +716,7 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer
|
|||
UObject* service = f->create(key, this, status);
|
||||
if (U_FAILURE(status)) {
|
||||
delete cacheDescriptorList;
|
||||
delete service;
|
||||
return NULL;
|
||||
}
|
||||
if (service != NULL) {
|
||||
|
|
|
@ -637,7 +637,6 @@ ICUServiceTest::testAPI_Two()
|
|||
service.registerFactory(f, status);
|
||||
}
|
||||
|
||||
|
||||
// iterate over the visual ids returned by the multiple factory
|
||||
{
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
@ -648,6 +647,7 @@ ICUServiceTest::testAPI_Two()
|
|||
UnicodeString* result = (UnicodeString*)service.get(*id, status);
|
||||
if (result) {
|
||||
logln(" " + *id + " --> " + *result);
|
||||
delete result;
|
||||
} else {
|
||||
errln("could not find " + *id);
|
||||
}
|
||||
|
@ -1361,6 +1361,8 @@ void ICUServiceTest::testCoverage()
|
|||
delete obj;
|
||||
}
|
||||
|
||||
delete key;
|
||||
|
||||
#if 0
|
||||
// ResourceBundleFactory
|
||||
ICUResourceBundleFactory rbf = new ICUResourceBundleFactory();
|
||||
|
|
Loading…
Add table
Reference in a new issue