when is a class is unloaded [duplicate]

 ̄綄美尐妖づ 提交于 2019-12-10 17:12:15

问题


Possible Duplicate:
Unloading classes in java?

public class MyClassLoader extends ClassLoader {
        private static final int BUFFER_SIZE = 8192;

    }

As per my knowledge a class is loaded by classLoader in JVM when it requires that particlar class . But you please tell me when a class is exactly unloaded ??


回答1:


Classes are eligible to be unloaded if the class loader is GC'ed. So in your example, there are no more references to MyClassLoader.



来源:https://stackoverflow.com/questions/6710328/when-is-a-class-is-unloaded

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!