src/hotspot/share/classfile/classLoaderData.cpp
changeset 51747 9bf5205655ee
parent 51698 74dde8b66b7f
child 51887 32161fbea3fe
--- a/src/hotspot/share/classfile/classLoaderData.cpp	Fri Sep 14 09:00:22 2018 -0700
+++ b/src/hotspot/share/classfile/classLoaderData.cpp	Fri Sep 14 12:10:28 2018 -0400
@@ -769,6 +769,14 @@
   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