X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b75a7d8f3b4adbae880cab104ce2c6a50eee4db2..374ca955a76ecab1204ca8bfa63ff9238d998416:/icuSources/common/icunotif.cpp diff --git a/icuSources/common/icunotif.cpp b/icuSources/common/icunotif.cpp index f3f6e80a..f8b64862 100644 --- a/icuSources/common/icunotif.cpp +++ b/icuSources/common/icunotif.cpp @@ -1,6 +1,6 @@ /** ******************************************************************************* - * Copyright (C) 2001-2002, International Business Machines Corporation and * + * Copyright (C) 2001-2003, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ @@ -10,11 +10,30 @@ #if !UCONFIG_NO_SERVICE #include "icunotif.h" +#if DEBUG #include +#endif U_NAMESPACE_BEGIN -const char EventListener::fgClassID = '\0'; +EventListener::~EventListener() {} +UOBJECT_DEFINE_RTTI_IMPLEMENTATION(EventListener) + +ICUNotifier::ICUNotifier(void) + : notifyLock(0), listeners(NULL) +{ + umtx_init(¬ifyLock); +} + +ICUNotifier::~ICUNotifier(void) { + { + Mutex lmx(¬ifyLock); + delete listeners; + listeners = NULL; + } + umtx_destroy(¬ifyLock); +} + void ICUNotifier::addListener(const EventListener* l, UErrorCode& status) @@ -90,7 +109,7 @@ ICUNotifier::notifyChanged(void) } } -U_NAMESPACE_END; +U_NAMESPACE_END /* UCONFIG_NO_SERVICE */ #endif