Questions about classloader design?

asked 2020-10-24 05:28:09 -0500

daohu527 gravatar image

I read the classloader source code and the design doc, but I still have some questions.

  1. In my opinion, one class loader corresponds to one path and has a reference count, so the path should only be loaded only once. Why isLibraryLoaded to determine "are_meta_objs_bound_to_loader" is true ?

  2. "Load_ref_count_" seems meaningless, "class_loader::impl::loadLibrary" will check the library is load, and will not load library twice.

edit retag flag offensive close merge delete