< prev index next >
src/hotspot/share/oops/constantPool.cpp
Print this page
*** 2531,2540 ****
--- 2531,2551 ----
guarantee(pool_holder()->is_klass(), "should be klass");
}
}
+ SymbolHashMap::~SymbolHashMap() {
+ SymbolHashMapEntry* next;
+ for (int i = 0; i < _table_size; i++) {
+ for (SymbolHashMapEntry* cur = bucket(i); cur != NULL; cur = next) {
+ next = cur->next();
+ delete(cur);
+ }
+ }
+ FREE_C_HEAP_ARRAY(SymbolHashMapBucket, _buckets);
+ }
+
void SymbolHashMap::add_entry(Symbol* sym, u2 value) {
char *str = sym->as_utf8();
unsigned int hash = compute_hash(str, sym->utf8_length());
unsigned int index = hash % table_size();
< prev index next >