"dimiter" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > A potential problem of this approach is that the ClassLoader is allowed to unload the > class if there are no refferences to it, and reload it the next time it's used.
It doesn't seem so. ClassLoader's are not allowed to unload/reload classes. A class is unloaded only when the ClassLoader itself is unloaded. And if the ClassLoader is unloaded, it means there are no reachable instances created by it (and the ClassLoader itself isn't being referenced from some other place), so for all effects the singleton itself is unreachable. >From the JLS: 12.7 Unloading of Classes and Interfaces An implementation of the Java programming language may unload classes. A class or interface may be unloaded if and only if its defining class loader may be reclaimed by the garbage collector as discussed in �12.6. Classes and interfaces loaded by the bootstrap loader may not be unloaded. Carlos -- Carlos Costa e Silva <[EMAIL PROTECTED]> _______________________________________________ Eap-features mailing list [EMAIL PROTECTED] http://lists.jetbrains.com/mailman/listinfo/eap-features
