[pylucene-dev] garbage collector

Yura Smolsky info at altervision.biz
Mon Feb 21 01:52:53 PST 2005


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.




More information about the pylucene-dev mailing list