Monday, July 31, 2006

Java - Thread Local

Use a thread local variable (where each thread has a separate value) when you want to carry a value along without explicitly passing it from method to method down the call stack, and when appropriate, remember to explicitly clear the value in a finally block to prevent memory leaks:

CrazyBob.org has detail article about this.

No comments: