[IronPython] Thread local storage in IronPython 2.6

Dino Viehland dinov at microsoft.com
Mon Oct 5 19:12:07 CEST 2009


Michael wrote:
> We're working on the port of Resolver One to IronPython 2.6. We're
> finding that in quite a few of our tests our documents are now not being
> garbage collected, which would be a major memory leak in Resolver One if
> left unaddressed.
> 
> As far as we can *tell* what is keeping the documents alive is a
> PythonFunctionStack (?) in thread local storage, put there by IronPython
> itself. This doesn't happen with IronPython 2. Does this ring a bell as
> a change in IronPython 2.6?

What's the threading story like in your tests?  Is it just one thread or 
are you repeatedly creating new threads?  

Another way of looking at this is the ThreadLocal object has a _stores
array.  What indexes in that array are keeping the objects alive?





More information about the Ironpython-users mailing list