#include <string.h>
#include "unicode/localpointer.h"
+#ifdef __cplusplus
+#include "unicode/uobject.h"
+#endif
+
#if U_DEBUG && defined(UPRV_MALLOC_COUNT)
#include <stdio.h>
#endif
* It doesn't do anything more than that, and is intentionally kept minimalist.
*/
template<typename T>
-class MemoryPool {
+class MemoryPool : public UMemory {
enum { STACK_CAPACITY = 8 };
public:
MemoryPool() : count(0), pool() {}
#include "unicode/utypes.h"
#include "unicode/unistr.h"
+#include "unicode/uobject.h"
#include "charstr.h"
#include "cmemory.h"
SPECIALTYPE_RG_KEY_VALUE = 4
} SpecialType;
-typedef struct LocExtKeyData {
+struct LocExtKeyData : public icu::UMemory {
const char* legacyId;
const char* bcpId;
icu::LocalUHashtablePointer typeMap;
uint32_t specialTypes;
-} LocExtKeyData;
+};
-typedef struct LocExtType {
+struct LocExtType : public icu::UMemory {
const char* legacyId;
const char* bcpId;
-} LocExtType;
+};
static icu::MemoryPool<icu::CharString>* gKeyTypeStringPool = NULL;
static icu::MemoryPool<LocExtKeyData>* gLocExtKeyDataEntries = NULL;