Skip to content
Advertisement

Tag: thread-local

How to clean up ThreadLocals

Does any one have an example how to do this? Are they handled by the garbage collector? I’m using Tomcat 6. Answer The javadoc says this: “Each thread holds an implicit reference to its copy of a thread-local variable as long as the thread is alive and the ThreadLocal instance is accessible; after a thread goes away, all of its

Advertisement