Well ... if the thread dies, the value in its ThreadLocal should be GC'd.

If the thread does not die (eg thread pool in an app server) then the ThreadLocal value remains, but that value is a shallow clone of the original TermVectorsReader and should not be consuming that much RAM per thread.

So I think it's OK?

Mike

Roman Puchkovskiy wrote:


Hi.

There's a ThreadLocal field in SegmentReader (it's called termVectorsLocal).
Some value is put to it, but it's never cleared.
Is it ok? It looks like sometimes this behavior may lead to leaks.

This is the same in lucene-2.2.0 and lucene-2.3.2.

Thanks in advance.
--
View this message in context: 
http://www.nabble.com/ThreadLocal-in-SegmentReader-tp18306230p18306230.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to