Hello all,
I'm tracking classloader leaks more or less as a hobby and found out
that one of the (many) source of leaks come from threads that still
have a reference to a classloader through their contextClassLoader
instance variable.
So, I'm wondering : what if instead of "private ClassLoader
contextClassLoader;" we had "private WeakReference<ClassLoader>
contextClassLoaderRef" and the method getContextClassLoader would more
or less returned contextClassLoaderRef.get() ?
Would it break many things ? is it incompatible with the specs ?
I'm very interested to read your opinion on this...
Sylvain