<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I've just found out that one of objects is not destroyed when it<br>
should be. This means that something was holding reference to this<br>
object or part of it (i.e. method). Is there any way to check what<br>
holds that reference? I am unable to do that just looking to the code<br>
or debugging it because it is pretty complicated, but I am able to<br>
invoke this situation again.<br></blockquote><div><br>I don't think that's possible, since that would mean Python would need
to keep a reference to the object holding the reference, which seems
pretty awkward. <br>
<br>You can however, obtain the number of referencing objects using
sys.getrefcount(object). You have to subtract 1 from the result, as the
function itself of course holds a reference to at the moment it is
being called.<br>
<br>  Almar <br></div></div>