<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-2"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks - that works. I've also found Kamil's blog post:<br>
<a
href="http://blog.kamil.dworakowski.name/2008/02/debugging-memory-problems-in-ironpython.html">http://blog.kamil.dworakowski.name/2008/02/debugging-memory-problems-in-ironpython.html</a><br>
<br>
Now I'm fighting with <Unloaded Type>s - trying to convert
them to something readable...<br>
Kamil's script does not seem to work - I don't see any dict holding
the ironpython object in the stacktrace: <br>
<br>
<tt>...<br>
0330d0f4(System.Windows.Controls.StackPanel)-><br>
0330d22c(System.Windows.Controls.UIElementCollection)-><br>
0330d240(System.Windows.Media.VisualCollection)-><br>
0330d520(System.Object[])-><br>
0330d428(System.Windows.Controls.Button)-><br>
0824cb0c(System.Windows.EffectiveValueEntry[])-><br>
0824cb00(System.Windows.EventHandlersStore)-><br>
0824cc00(MS.Utility.SingleObjectMap)-><br>
0824cbe0(MS.Utility.FrugalObjectList`1[[System.Windows.RoutedEventHandlerInfo,
PresentationCore]])-><br>
0824cbec(MS.Utility.SingleItemList`1[[System.Windows.RoutedEventHandlerInfo,
PresentationCore]])-><br>
0824caa8(System.Windows.RoutedEventHandler)-><br>
0824ca44(System.Object[])-><br>
<b> 0824ca18(IronPython.Runtime.Method)-><br>
08162f84(<Unloaded Type>)-></b><br>
08163d78(IronPython.Runtime.PythonDictionary)-><br>
08163d6c(IronPython.Runtime.StringDictionaryStorage)-><br>
08163d84(System.Collections.Generic.Dictionary`2[[System.String,
mscorlib],[System.Object, mscorlib]])-><br>
081c5558(System.Collections.Generic.Dictionary`2+Entry[[System.String,
mscorlib],[System.Object, mscorlib]][])-><br>
0816b3bc(System.GopherStyleUriParser)</tt><br>
<br>
--<br>
-- Lukáš<br>
<br>
<br>
On 18.10.2010 20:04, Jonathan Allen wrote:
<blockquote cite="mid:4cbc8c04.0a06df0a.4057.ffffc1be@mx.google.com"
type="cite">
<pre wrap="">One trick is to give it a radioactive marker like they do in medical shows.
Have that instance you care about reference an instance of EmailMessage or some other class you aren't actually using. Finding the EmailMessage object should be easy because there is only one, and from there you can find the IronPython object you are after.
I use RedGate instead of WinDbg, so I'm not sure this will work for you. If you try it, please let me know the results.
Jonathan
-----Original Message-----
From: Lukas Cenovsky <a class="moz-txt-link-rfc2396E" href="mailto:cenovsky@bakalari.cz"><cenovsky@bakalari.cz></a>
Sent: Monday, October 18, 2010 10:01 AM
To: Discussion of IronPython <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.ironpython.com"><users@lists.ironpython.com></a>
Subject: [IronPython] gcroot for ironpython object
Hi all,
I have an instance of IronPython object and I'd like to find out why it
is kept in memory (I use weakref to check it is still in the memory).
What is the best way to find the object in WinDbg so I can call gcroot
for it? Or is there a better way to find out why my object is kept in
memory?
Thanks.
--
-- Lukáš
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a>
<a class="moz-txt-link-freetext" href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a>
<a class="moz-txt-link-freetext" href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a>
</pre>
</blockquote>
<br>
</body>
</html>