< prev index next >

src/hotspot/share/classfile/classLoaderData.cpp

Print this page




 752   if (m != NULL) {
 753     _metaspace = NULL;
 754     delete m;
 755   }
 756   // Clear all the JNI handles for methods
 757   // These aren't deallocated and are going to look like a leak, but that's
 758   // needed because we can't really get rid of jmethodIDs because we don't
 759   // know when native code is going to stop using them.  The spec says that
 760   // they're "invalid" but existing programs likely rely on their being
 761   // NULL after class unloading.
 762   if (_jmethod_ids != NULL) {
 763     Method::clear_jmethod_ids(this);
 764   }
 765   // Delete lock
 766   delete _metaspace_lock;
 767 
 768   // Delete free list
 769   if (_deallocate_list != NULL) {
 770     delete _deallocate_list;
 771   }








 772 }
 773 
 774 // Returns true if this class loader data is for the app class loader
 775 // or a user defined system class loader.  (Note that the class loader
 776 // data may be unsafe anonymous.)
 777 bool ClassLoaderData::is_system_class_loader_data() const {
 778   return SystemDictionary::is_system_class_loader(class_loader());
 779 }
 780 
 781 // Returns true if this class loader data is for the platform class loader.
 782 // (Note that the class loader data may be unsafe anonymous.)
 783 bool ClassLoaderData::is_platform_class_loader_data() const {
 784   return SystemDictionary::is_platform_class_loader(class_loader());
 785 }
 786 
 787 // Returns true if the class loader for this class loader data is one of
 788 // the 3 builtin (boot application/system or platform) class loaders,
 789 // including a user-defined system class loader.  Note that if the class
 790 // loader data is for an unsafe anonymous class then it may get freed by a GC
 791 // even if its class loader is one of these loaders.




 752   if (m != NULL) {
 753     _metaspace = NULL;
 754     delete m;
 755   }
 756   // Clear all the JNI handles for methods
 757   // These aren't deallocated and are going to look like a leak, but that's
 758   // needed because we can't really get rid of jmethodIDs because we don't
 759   // know when native code is going to stop using them.  The spec says that
 760   // they're "invalid" but existing programs likely rely on their being
 761   // NULL after class unloading.
 762   if (_jmethod_ids != NULL) {
 763     Method::clear_jmethod_ids(this);
 764   }
 765   // Delete lock
 766   delete _metaspace_lock;
 767 
 768   // Delete free list
 769   if (_deallocate_list != NULL) {
 770     delete _deallocate_list;
 771   }
 772 
 773   // Decrement refcounts of Symbols if created.
 774   if (_name != NULL) {
 775     _name->decrement_refcount();
 776   }
 777   if (_name_and_id != NULL) {
 778     _name_and_id->decrement_refcount();
 779   }
 780 }
 781 
 782 // Returns true if this class loader data is for the app class loader
 783 // or a user defined system class loader.  (Note that the class loader
 784 // data may be unsafe anonymous.)
 785 bool ClassLoaderData::is_system_class_loader_data() const {
 786   return SystemDictionary::is_system_class_loader(class_loader());
 787 }
 788 
 789 // Returns true if this class loader data is for the platform class loader.
 790 // (Note that the class loader data may be unsafe anonymous.)
 791 bool ClassLoaderData::is_platform_class_loader_data() const {
 792   return SystemDictionary::is_platform_class_loader(class_loader());
 793 }
 794 
 795 // Returns true if the class loader for this class loader data is one of
 796 // the 3 builtin (boot application/system or platform) class loaders,
 797 // including a user-defined system class loader.  Note that if the class
 798 // loader data is for an unsafe anonymous class then it may get freed by a GC
 799 // even if its class loader is one of these loaders.


< prev index next >