You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by Ayende Rahien <ay...@ayende.com> on 2010/05/20 04:25:58 UTC

Memory leak on 2.9.2

With Lucene 2.9.1, if i created a new StandardAnalyzer and not close it, I
wouldn't get a memory leak.
That is because of the (slow) thread local implementation.
The current implementation _requires_ closing StandardAnalyzer, or you get a
pretty sever, memory laek.

Re: Memory leak on 2.9.2

Posted by Robert Jordan <ro...@gmx.net>.
On 20.05.2010 10:46, Robert Jordan wrote:
> On 20.05.2010 04:25, Ayende Rahien wrote:
>> With Lucene 2.9.1, if i created a new StandardAnalyzer and not close
>> it, I
>> wouldn't get a memory leak.
>> That is because of the (slow) thread local implementation.
>> The current implementation _requires_ closing StandardAnalyzer, or you
>> get a
>> pretty sever, memory laek.
>
> Can the leak be reproduced with a simple "new StandardAnalyzer()"
> statement? If not, please post a test case, if possible.

Please give this patch a try:

https://issues.apache.org/jira/secure/attachment/12445047/CloseableThreadLocal.diff

which I've attached to this issue:

https://issues.apache.org/jira/browse/LUCENENET-358

Thanks
Robert


Re: Memory leak on 2.9.2

Posted by Robert Jordan <ro...@gmx.net>.
On 20.05.2010 04:25, Ayende Rahien wrote:
> With Lucene 2.9.1, if i created a new StandardAnalyzer and not close it, I
> wouldn't get a memory leak.
> That is because of the (slow) thread local implementation.
> The current implementation _requires_ closing StandardAnalyzer, or you get a
> pretty sever, memory laek.

Can the leak be reproduced with a simple "new StandardAnalyzer()"
statement? If not, please post a test case, if possible.

Robert