What you're probably seeing is the memory not being collected yet.
It gets collected sometime at the whim of the JVM, so it probably
only *looks* like it's not being freed.

I'd expect that what you'll really see is the memory continually increase
then hit a saw-tooth pattern (jconsole makes a nice graph) when GC
finally hits. Which you can probably force more quickly by dropping the
memory allocated to the JVM.

BTW, this kind of question is probably better suited to the SOlr user's list,
this list is intended for discussing the code development itself.


Best
Erick

On Sun, Jan 8, 2012 at 5:53 PM, christian.k <[email protected]> wrote:
> Hi,
>
> I'm using the RAMDirectory due to performance reasons. Instead of having the
> hassle to maintain that directory, I'm fetching documents from the database
> in particular time interval and build a new directory on that. So after that
> I don't need the old one anymore. Therefore I'm calling close() to get rid
> of it. Everything works well except for the fact that my RAM resources are
> not freed. With every iteration the required RAM jumps up for a certain
> amount and doesn't fall back.
>
> Did I understand something wrong or is it a bug of Lucene? If yes, can you
> tell me a workaround?
>
> Thanks in advance!
>
> Regards,
> Chris
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/RAMDirectory-doesn-t-free-RAM-after-execution-tp3643206p3643206.html
> Sent from the Lucene - Java Developer 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