这篇教程C++ uhash_close函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中uhash_close函数的典型用法代码示例。如果您正苦于以下问题:C++ uhash_close函数的具体用法?C++ uhash_close怎么用?C++ uhash_close使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了uhash_close函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: uhash_closevoid Region::cleanupRegionData() { for (int32_t i = 0 ; i < URGN_LIMIT ; i++ ) { if ( availableRegions[i] ) { delete availableRegions[i]; } } if (regionAliases) { uhash_close(regionAliases); } if (numericCodeMap) { uhash_close(numericCodeMap); } if (regionIDMap) { uhash_close(regionIDMap); } if (allRegions) { allRegions->removeAllElements(); // Don't need the temporary list anymore. delete allRegions; allRegions = NULL; } regionAliases = numericCodeMap = regionIDMap = NULL; gRegionDataInitOnce.reset();}
开发者ID:Cyril2004,项目名称:proto-quic,代码行数:28,
示例2: zoneMeta_cleanup/** * Cleanup callback func */static UBool U_CALLCONV zoneMeta_cleanup(void){ umtx_destroy(&gZoneMetaLock); if (gCanonicalMap != NULL) { uhash_close(gCanonicalMap); gCanonicalMap = NULL; } gCanonicalMapInitialized = FALSE; if (gOlsonToMeta != NULL) { uhash_close(gOlsonToMeta); gOlsonToMeta = NULL; } gOlsonToMetaInitialized = FALSE; if (gMetaToOlson != NULL) { uhash_close(gMetaToOlson); gMetaToOlson = NULL; } gMetaToOlsonInitialized = FALSE; freeUStringTable(); return TRUE;}
开发者ID:Andproject,项目名称:platform_external_icu4c,代码行数:29,
示例3: zoneMeta_cleanupU_CDECL_BEGIN/** * Cleanup callback func */static UBool U_CALLCONV zoneMeta_cleanup(void){ if (gCanonicalIDCache != NULL) { uhash_close(gCanonicalIDCache); gCanonicalIDCache = NULL; } gCanonicalIDCacheInitialized = FALSE; if (gOlsonToMeta != NULL) { uhash_close(gOlsonToMeta); gOlsonToMeta = NULL; } gOlsonToMetaInitialized = FALSE; if (gMetaZoneIDTable != NULL) { uhash_close(gMetaZoneIDTable); } // delete after closing gMetaZoneIDTable, because it holds // value objects held by the hashtable delete gMetaZoneIDs; gMetaZoneIDsInitialized = FALSE; delete gSingleZoneCountries; delete gMultiZonesCountries; gCountryInfoVectorsInitialized = FALSE; return TRUE;}
开发者ID:quinsmpang,项目名称:Tools,代码行数:33,
示例4: initAvailableMetaZoneIDsstatic void U_CALLCONV initAvailableMetaZoneIDs () { U_ASSERT(gMetaZoneIDs == NULL); U_ASSERT(gMetaZoneIDTable == NULL); ucln_i18n_registerCleanup(UCLN_I18N_ZONEMETA, zoneMeta_cleanup); UErrorCode status = U_ZERO_ERROR; gMetaZoneIDTable = uhash_open(uhash_hashUnicodeString, uhash_compareUnicodeString, NULL, &status); if (U_FAILURE(status) || gMetaZoneIDTable == NULL) { gMetaZoneIDTable = NULL; return; } uhash_setKeyDeleter(gMetaZoneIDTable, uprv_deleteUObject); // No valueDeleter, because the vector maintain the value objects gMetaZoneIDs = new UVector(NULL, uhash_compareUChars, status); if (U_FAILURE(status) || gMetaZoneIDs == NULL) { gMetaZoneIDs = NULL; uhash_close(gMetaZoneIDTable); gMetaZoneIDTable = NULL; return; } gMetaZoneIDs->setDeleter(uprv_free); UResourceBundle *rb = ures_openDirect(NULL, gMetaZones, &status); UResourceBundle *bundle = ures_getByKey(rb, gMapTimezonesTag, NULL, &status); UResourceBundle res; ures_initStackObject(&res); while (U_SUCCESS(status) && ures_hasNext(bundle)) { ures_getNextResource(bundle, &res, &status); if (U_FAILURE(status)) { break; } const char *mzID = ures_getKey(&res); int32_t len = uprv_strlen(mzID); UChar *uMzID = (UChar*)uprv_malloc(sizeof(UChar) * (len + 1)); if (uMzID == NULL) { status = U_MEMORY_ALLOCATION_ERROR; break; } u_charsToUChars(mzID, uMzID, len); uMzID[len] = 0; UnicodeString *usMzID = new UnicodeString(uMzID); if (uhash_get(gMetaZoneIDTable, usMzID) == NULL) { gMetaZoneIDs->addElement((void *)uMzID, status); uhash_put(gMetaZoneIDTable, (void *)usMzID, (void *)uMzID, &status); } else { uprv_free(uMzID); delete usMzID; } } ures_close(&res); ures_close(bundle); ures_close(rb); if (U_FAILURE(status)) { uhash_close(gMetaZoneIDTable); delete gMetaZoneIDs; gMetaZoneIDTable = NULL; gMetaZoneIDs = NULL; }}
开发者ID:Akesure,项目名称:jxcore,代码行数:60,
示例5: uhash_closevoidTZGNCore::cleanup() { if (fLocaleDisplayNames != NULL) { delete fLocaleDisplayNames; } if (fTimeZoneNames != NULL) { delete fTimeZoneNames; } uhash_close(fLocationNamesMap); uhash_close(fPartialLocationNamesMap);}
开发者ID:119120119,项目名称:node,代码行数:12,
示例6: ures_closevoidTimeZoneNamesImpl::cleanup() { if (fZoneStrings != NULL) { ures_close(fZoneStrings); fZoneStrings = NULL; } if (fMZNamesMap != NULL) { uhash_close(fMZNamesMap); fMZNamesMap = NULL; } if (fTZNamesMap != NULL) { uhash_close(fTZNamesMap); fTZNamesMap = NULL; }}
开发者ID:00zhengfu00,项目名称:third_party,代码行数:15,
示例7: uprv_freeConfusabledataBuilder::~ConfusabledataBuilder() { uprv_free(fInput); uregex_close(fParseLine); uregex_close(fParseHexNum); uhash_close(fSLTable); uhash_close(fSATable); uhash_close(fMLTable); uhash_close(fMATable); delete fKeySet; delete fKeyVec; delete fStringTable; delete fStringLengthsTable; delete fValueVec; delete stringPool;}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:15,
示例8: initCacheU_CDECL_END/** Initializes the cache for resources */static voidinitCache(UErrorCode * status){ UBool makeCache; UMTX_CHECK(&usprepMutex, (SHARED_DATA_HASHTABLE == NULL), makeCache); if (makeCache) { UHashtable * newCache = uhash_open(hashEntry, compareEntries, NULL, status); if (U_SUCCESS(*status)) { umtx_lock(&usprepMutex); if (SHARED_DATA_HASHTABLE == NULL) { SHARED_DATA_HASHTABLE = newCache; ucln_common_registerCleanup(UCLN_COMMON_USPREP, usprep_cleanup); newCache = NULL; } umtx_unlock(&usprepMutex); } if (newCache != NULL) { uhash_close(newCache); } }}
开发者ID:Botyto,项目名称:Core,代码行数:29,
示例9: hashICharsstatic void hashIChars(void) { static const char which[] = "which"; static const char WHICH2[] = "WHICH"; static const char where[] = "where"; UErrorCode status = U_ZERO_ERROR; UHashtable *hash; hash = uhash_open(uhash_hashIChars, uhash_compareIChars, NULL, &status); if (U_FAILURE(status)) { log_err("FAIL: uhash_open failed with %s and returned 0x%08x/n", u_errorName(status), hash); return; } if (hash == NULL) { log_err("FAIL: uhash_open returned NULL/n"); return; } log_verbose("Ok: uhash_open returned 0x%08X/n", hash); _put(hash, which, 1, 0); _put(hash, WHICH2, 2, 1); _put(hash, where, 3, 0); if(uhash_count(hash) != 2){ log_err("FAIL: uhas_count() failed. Expected: 1, Got: %d/n", uhash_count(hash)); } _remove(hash, which, 2); uhash_close(hash);}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:29,
示例10: umtx_lockCollDataCache::~CollDataCache(){ umtx_lock(&lock); uhash_close(cache); cache = NULL; umtx_unlock(&lock);}
开发者ID:Abocer,项目名称:android-4.2_r1,代码行数:7,
示例11: UMTX_CHECK /* udata_getCacheHashTable() * Get the hash table used to store the data cache entries. * Lazy create it if it doesn't yet exist. */static UHashtable *udata_getHashTable() { UErrorCode err = U_ZERO_ERROR; UBool cacheIsInitialized; UHashtable *tHT = NULL; UMTX_CHECK(NULL, (gCommonDataCache != NULL), cacheIsInitialized); if (cacheIsInitialized) { return gCommonDataCache; } tHT = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &err); /* Check for null pointer. */ if (tHT == NULL) { return NULL; /* TODO: Handle this error better. */ } uhash_setValueDeleter(tHT, DataCacheElement_deleter); umtx_lock(NULL); if (gCommonDataCache == NULL) { gCommonDataCache = tHT; tHT = NULL; ucln_common_registerCleanup(UCLN_COMMON_UDATA, udata_cleanup); } umtx_unlock(NULL); if (tHT != NULL) { uhash_close(tHT); } if (U_FAILURE(err)) { return NULL; /* TODO: handle this error better. */ } return gCommonDataCache;}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:38,
示例12: utext_close//--------------------------------------------------------------------------//// zap Delete everything owned by this RegexPattern.////--------------------------------------------------------------------------void RegexPattern::zap() { delete fCompiledPat; fCompiledPat = NULL; int i; for (i=1; i<fSets->size(); i++) { UnicodeSet *s; s = (UnicodeSet *)fSets->elementAt(i); if (s != NULL) { delete s; } } delete fSets; fSets = NULL; delete[] fSets8; fSets8 = NULL; delete fGroupMap; fGroupMap = NULL; delete fInitialChars; fInitialChars = NULL; delete fInitialChars8; fInitialChars8 = NULL; if (fPattern != NULL) { utext_close(fPattern); fPattern = NULL; } if (fPatternString != NULL) { delete fPatternString; fPatternString = NULL; } uhash_close(fNamedCaptureMap); fNamedCaptureMap = NULL;}
开发者ID:Acorld,项目名称:WinObjC-Heading,代码行数:37,
示例13: uloc_deleteKeyDataEntrystatic void U_CALLCONVuloc_deleteKeyDataEntry(void* obj) { LocExtKeyData* keyData = (LocExtKeyData*)obj; if (keyData->typeMap != NULL) { uhash_close(keyData->typeMap); } uprv_free(keyData);}
开发者ID:MoonchildProductions,项目名称:Pale-Moon,代码行数:8,
示例14: uhash_closeIdentifierInfo::~IdentifierInfo() { delete fIdentifier; delete fRequiredScripts; uhash_close(fScriptSetSet); delete fCommonAmongAlternates; delete fNumerics; delete fIdentifierProfile;}
开发者ID:icu-project,项目名称:icu4c,代码行数:8,
示例15: uhash_closeSPUStringPool::~SPUStringPool() { int i; for (i=fVec->size()-1; i>=0; i--) { SPUString *s = static_cast<SPUString *>(fVec->elementAt(i)); delete s; } delete fVec; uhash_close(fHash);}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:9,
示例16: usprep_cleanupstatic UBool U_CALLCONV usprep_cleanup(void){ if (SHARED_DATA_HASHTABLE != NULL) { usprep_internal_flushCache(TRUE); if (SHARED_DATA_HASHTABLE != NULL && uhash_count(SHARED_DATA_HASHTABLE) == 0) { uhash_close(SHARED_DATA_HASHTABLE); SHARED_DATA_HASHTABLE = NULL; } } gSharedDataInitOnce.reset(); return (SHARED_DATA_HASHTABLE == NULL);}
开发者ID:basti1302,项目名称:node,代码行数:11,
示例17: cdf_cleanupU_NAMESPACE_ENDU_CDECL_BEGINstatic UBool U_CALLCONV cdf_cleanup(void) { if (gCompactDecimalData != NULL) { uhash_close(gCompactDecimalData); gCompactDecimalData = NULL; } return TRUE;}
开发者ID:MoonchildProductions,项目名称:Pale-Moon,代码行数:11,
示例18: uprv_loaded_normalizer2_cleanupstatic UBool U_CALLCONV uprv_loaded_normalizer2_cleanup() { delete nfkcSingleton; nfkcSingleton = NULL; delete nfkc_cfSingleton; nfkc_cfSingleton = NULL; uhash_close(cache); cache=NULL; nfkcInitOnce.reset(); nfkc_cfInitOnce.reset(); return TRUE;}
开发者ID:AaronNGray,项目名称:texlive-libs,代码行数:11,
示例19: flushUnifiedCache::~UnifiedCache() { // Try our best to clean up first. flush(); { // Now all that should be left in the cache are entries that refer to // each other and entries with hard references from outside the cache. // Nothing we can do about these so proceed to wipe out the cache. Mutex lock(&gCacheMutex); _flush(TRUE); } uhash_close(fHashtable);}
开发者ID:Mikhaska,项目名称:node,代码行数:12,
示例20: uhash_closeAlphabeticIndex::~AlphabeticIndex() { uhash_close(alreadyIn_); delete bucketList_; delete collator_; delete collatorPrimaryOnly_; delete firstScriptCharacters_; delete labels_; delete inputRecords_; delete noDistinctSorting_; delete notAlphabetic_; delete initialLabels_;}
开发者ID:0omega,项目名称:platform_external_icu4c,代码行数:12,
示例21: TestBasicstatic void TestBasic(void) { const char one[4] = {0x6F, 0x6E, 0x65, 0}; /* "one" */ const char one2[4] = {0x6F, 0x6E, 0x65, 0}; /* Get around compiler optimizations */ const char two[4] = {0x74, 0x77, 0x6F, 0}; /* "two" */ const char three[6] = {0x74, 0x68, 0x72, 0x65, 0x65, 0}; /* "three" */ const char omega[6] = {0x6F, 0x6D, 0x65, 0x67, 0x61, 0}; /* "omega" */ UErrorCode status = U_ZERO_ERROR; UHashtable *hash; hash = uhash_open(hashChars, isEqualChars, &status); if (U_FAILURE(status)) { log_err("FAIL: uhash_open failed with %s and returned 0x%08x/n", u_errorName(status), hash); return; } if (hash == NULL) { log_err("FAIL: uhash_open returned NULL/n"); return; } log_verbose("Ok: uhash_open returned 0x%08X/n", hash); _put(hash, one, 1, 0); _put(hash, omega, 24, 0); _put(hash, two, 2, 0); _put(hash, three, 3, 0); _put(hash, one, -1, 1); _put(hash, two, -2, 2); _put(hash, omega, 48, 24); _put(hash, one, 100, -1); _get(hash, three, 3); _remove(hash, two, -2); _get(hash, two, 0); _get(hash, one, 100); _put(hash, two, 200, 0); _get(hash, omega, 48); _get(hash, two, 200); if(_compareChars((void*)one, (void*)three) == TRUE || _compareChars((void*)one, (void*)one2) != TRUE || _compareChars((void*)one, (void*)one) != TRUE || _compareChars((void*)one, NULL) == TRUE ) { log_err("FAIL: compareChars failed/n"); } if(_compareIChars((void*)one, (void*)three) == TRUE || _compareIChars((void*)one, (void*)one) != TRUE || _compareIChars((void*)one, (void*)one2) != TRUE || _compareIChars((void*)one, NULL) == TRUE ) { log_err("FAIL: compareIChars failed/n"); } uhash_close(hash);}
开发者ID:andrewleech,项目名称:firebird,代码行数:53,
示例22: uhash_closeZNStringPool::~ZNStringPool() { if (fHash != NULL) { uhash_close(fHash); fHash = NULL; } while (fChunks != NULL) { ZNStringPoolChunk *nextChunk = fChunks->fNext; delete fChunks; fChunks = nextChunk; }}
开发者ID:00zhengfu00,项目名称:third_party,代码行数:12,
示例23: tzgnCore_cleanupU_CDECL_BEGIN/** * Cleanup callback func */static UBool U_CALLCONV tzgnCore_cleanup(void){ if (gTZGNCoreCache != NULL) { uhash_close(gTZGNCoreCache); gTZGNCoreCache = NULL; } gTZGNCoreCacheInitialized = FALSE; return TRUE;}
开发者ID:119120119,项目名称:node,代码行数:13,
示例24: timeZoneNames_cleanupU_CDECL_BEGIN/** * Cleanup callback func */static UBool U_CALLCONV timeZoneNames_cleanup(void){ if (gTimeZoneNamesCache != NULL) { uhash_close(gTimeZoneNamesCache); gTimeZoneNamesCache = NULL; } gTimeZoneNamesCacheInitialized = FALSE; return TRUE;}
开发者ID:JoeDoyle23,项目名称:node,代码行数:13,
示例25: ucnv_cleanup/* Not supported API. Marked U_CAPI only for use by test programs. */U_CFUNC UBool U_EXPORT2 ucnv_cleanup(void) { if (SHARED_DATA_HASHTABLE != NULL) { ucnv_flushCache(); if (SHARED_DATA_HASHTABLE != NULL && uhash_count(SHARED_DATA_HASHTABLE) == 0) { uhash_close(SHARED_DATA_HASHTABLE); SHARED_DATA_HASHTABLE = NULL; } } umtx_destroy(&cnvCacheMutex); /* Don't worry about destroying the mutex even */ /* if the hash table still exists. The mutex */ /* will lazily re-init itself if needed. */ return (SHARED_DATA_HASHTABLE == NULL);}
开发者ID:andrewleech,项目名称:firebird,代码行数:15,
示例26: usprep_cleanupstatic UBool U_CALLCONV usprep_cleanup(void){ if (SHARED_DATA_HASHTABLE != NULL) { usprep_internal_flushCache(TRUE); if (SHARED_DATA_HASHTABLE != NULL && uhash_count(SHARED_DATA_HASHTABLE) == 0) { uhash_close(SHARED_DATA_HASHTABLE); SHARED_DATA_HASHTABLE = NULL; } } umtx_destroy(&usprepMutex); /* Don't worry about destroying the mutex even */ /* if the hash table still exists. The mutex */ /* will lazily re-init itself if needed. */ return (SHARED_DATA_HASHTABLE == NULL);}
开发者ID:S0043640wipro,项目名称:RiCRiPInt,代码行数:14,
示例27: locale_cleanupstatic UBool U_CALLCONV locale_cleanup(void){ U_NAMESPACE_USE delete [] gLocaleCache; gLocaleCache = NULL; gLocaleCacheInitOnce.reset(); if (gDefaultLocalesHashT) { uhash_close(gDefaultLocalesHashT); // Automatically deletes all elements, using deleter func. gDefaultLocalesHashT = NULL; } gDefaultLocale = NULL; return TRUE;}
开发者ID:winlibs,项目名称:icu4c,代码行数:15,
示例28: numfmt_cleanupstatic UBool U_CALLCONV numfmt_cleanup(void) {#if !UCONFIG_NO_SERVICE if (gService) { delete gService; gService = NULL; }#endif if (NumberingSystem_cache) { // delete NumberingSystem_cache; uhash_close(NumberingSystem_cache); NumberingSystem_cache = NULL; } return TRUE;}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:15,
注:本文中的uhash_close函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ uhash_get函数代码示例 C++ uglyf函数代码示例 |