|Keep It Simple, Stupid|
Re: threads and leaking scalars (Scalars leaked: 1)by dpmott (Scribe)
|on Feb 26, 2004 at 18:09 UTC||Need Help??|
I had this very same problem, and I finally figured it out.
If you change this line (in new()):
then it will work.
I suspect that there's too much magic associated with the @_ variable to let threads play nicely with it. So, my recommendation is to *not* use @_ in the same scope as you launch new threads.
Unfortunately, including other modules (say, XML::DOM) may cause this same problem, so you'd have to launch all of your threads before bringing in such modules. This might be a good use for Thread::Pool...