[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Annotation Tests in deployers-vfs
alesj
do-not-reply at jboss.com
Fri May 30 11:55:37 EDT 2008
"adrian at jboss.org" wrote : Ok, but if you do use the class, then you need to make sure it is removed
| at undeploy in the scanning deployer otherwise you'll cause a classloader leak.
I have a SoftRef on it.
| public class DefaultElement<A extends Annotation, M extends AccessibleObject> extends WeakClassLoaderHolder implements Element<A, M>
| {
| protected String className;
| protected Signature signature;
| protected Class<A> annClass;
| protected Class<M> aoClass;
|
| private SoftReference<Class<?>> classRef;
|
And WeakRef on the ClassLoader.
| abstract class WeakClassLoaderHolder
| {
| private WeakReference<ClassLoader> clRef;
|
| ...
|
| public class DefaultAnnotationEnvironment extends WeakClassLoaderHolder implements AnnotationEnvironment
|
Is that OK?
Or should I explicitly go and nullify it?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154712#4154712
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154712
More information about the jboss-dev-forums
mailing list