[pylucene-dev] garbage collector
Andi Vajda
vajda at osafoundation.org
Mon Feb 21 12:17:12 PST 2005
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
> pylucene-dev at osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
>
More information about the pylucene-dev
mailing list