Hello, Andi.

AV> The Java System.gc() method is available in PyLucene. As usual, calling it 
is
AV> only a hint to the garbage collector which may ignore it.
AV> Calling python's gc.collect() first would be a good idea.

System.gc()
or
gc.collect()

doesnt help. I have tried this under Java sources, old IndexSearcher was
recycled from memory.

>> Hello.
>>
>> Is there a way to start garbage collector manually to free memory
>> taken by PyLucene objects?
>> I have IndexSearcher's object with size of 2Gb. When I want to
>> recreate this object I would like to free existent one and then create
>> new one.
>>
>> i = IndexSearcher(fsDir)
>>
>> # perfom some searches
>> ...
>>
>> i.close()
>> del i
>>
>> # mem is still busy by old object
>> # we need to remove old object from memory.
>>
>> i = IndexSearcher(fsDir)
>> i.search(..)
>>
>> # here we have memory occupied by two big objects
>>
>> Yura Smolsky.
>>
>>
>> _______________________________________________
>> pylucene-dev mailing list
>> [email protected]
>> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
>>




Yura Smolsky.


_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to