[Ironpython-users] WeakRef'tracker

Markus Schaber m.schaber at 3s-software.com
Tue Oct 23 16:56:20 CEST 2012


Hi,

What's the purpose of IronPython.Rumtime.WeakRefTracker?

I did run the attached program (which is similar to the example for http://ironpython.codeplex.com/workitem/31764).

After running a bunch of scripts, the program calls GC.Collect() and GC.WaitForPendingFinalizers() several times.

At that moment, the code does not hold any reference to any IronPython or Scripting related objects, so I'd expect everything to be cleaned up by the GC.

Despite that fact, I found out that the program spends several seconds with 100% CPU load after returning from the Main() method. When Breaking it in the Debugger several times, it did always end up in the Finalizer method of the WeakRefTracker, so my guess is that most of those several seconds are spent there.

Best regards

Markus Schaber
--
___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50

Email: m.schaber at 3s-software.com<mailto:m.schaber at 3s-software.com> | Web: http://www.3s-software.com <http://www.3s-software.com/>
CoDeSys internet forum: http://forum.3s-software.com<http://forum-en.3s-software.com/>
Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20121023/71bfb143/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Program.cs
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20121023/71bfb143/attachment.ksh>


More information about the Ironpython-users mailing list