mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8243503: InstanceKlass::_array_name is not needed and leaks
Decrement the refcount for all Klass in class unloading. Reviewed-by: lfoltan, hseigel
This commit is contained in:
parent
05bf8dced5
commit
f8ab03fa04
6 changed files with 30 additions and 45 deletions
|
@ -640,8 +640,8 @@ public:
|
|||
} else {
|
||||
assert(k->is_instance_klass(), "Must be");
|
||||
_instance_class_released ++;
|
||||
InstanceKlass::release_C_heap_structures(InstanceKlass::cast(k));
|
||||
}
|
||||
k->release_C_heap_structures();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -869,7 +869,7 @@ void ClassLoaderData::free_deallocate_list_C_heap_structures() {
|
|||
} else if (m->is_klass()) {
|
||||
InstanceKlass* ik = (InstanceKlass*)m;
|
||||
// also releases ik->constants() C heap memory
|
||||
InstanceKlass::release_C_heap_structures(ik);
|
||||
ik->release_C_heap_structures();
|
||||
// Remove the class so unloading events aren't triggered for
|
||||
// this class (scratch or error class) in do_unloading().
|
||||
remove_class(ik);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue