4

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 ??

Community
  • 1
  • 1
Rvai
  • 41
  • 1
  • 2

1 Answers1

3

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

Amir Afghani
  • 37,814
  • 16
  • 84
  • 124