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


Andi..

On Mon, 21 Feb 2005, Yura Smolsky wrote:

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

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

Reply via email to