On Thu, 27 Apr 2006, Yura Smolsky wrote:
Hello ALL.
I have following program. It should starts threads and then frees
them. When I use for this task threading.Thread then there are not
leaks here. When I use PyLucene.PythonThread then I got very noticeable
memory leak.
PyLucene is last from trunk. Python is 2.4.2. Tested on winXP and debian
systems.
#!/usr/bin/python2.4
import PyLucene
import time
def funny(num):
l = []
l.append(num)
#time.sleep(0.001)
ths = []
for i in range(1000000):
th = PyLucene.PythonThread(target=funny, args=[i])
th.start()
This is most likely a libgcj issue. You didn't tell us what version of gcj you
were using. You could try to verify this writing the same Java program and
compiling it with gcj.
The simple workaround is to use a thread pool (which is recommended over
creating new threads anyway).
Andi..
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev