mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8210559: ClassLoaderData Symbols can leak
Unrefcount the symbol names when the CLD is destroyed Reviewed-by: lfoltan, jiangli, iklam
This commit is contained in:
parent
b16e5584ab
commit
bad4a92e55
5 changed files with 31 additions and 4 deletions
|
@ -769,6 +769,14 @@ ClassLoaderData::~ClassLoaderData() {
|
|||
if (_deallocate_list != NULL) {
|
||||
delete _deallocate_list;
|
||||
}
|
||||
|
||||
// Decrement refcounts of Symbols if created.
|
||||
if (_name != NULL) {
|
||||
_name->decrement_refcount();
|
||||
}
|
||||
if (_name_and_id != NULL) {
|
||||
_name_and_id->decrement_refcount();
|
||||
}
|
||||
}
|
||||
|
||||
// Returns true if this class loader data is for the app class loader
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue