Re: How to check what is holding reference to object

2010-05-05 Thread Marius Gedminas
On Apr 28, 3:59 pm, Christian Heimes li...@cheimes.de wrote: The trick works only for objects that are tracked by CPython's garbage collector. Simple and non-containerish objects like str, int, unicode and some other types aren't tracked by the gc. Yes they are -- have you ever tried

Re: How to check what is holding reference to object

2010-05-05 Thread Marius Gedminas
On Apr 27, 11:45 pm, Michal M mich.mier...@googlemail.com wrote: I've just found out that one of objects is not destroyed when it should be. This means that something was holding reference to this object or part of it (i.e. method). Is there any way to check what holds that reference? I am

Re: How to check what is holding reference to object

2010-04-28 Thread Michal M
On Apr 28, 12:02 am, Chris Rebert c...@rebertia.com wrote: On Tue, Apr 27, 2010 at 2:58 PM, Chris Rebert c...@rebertia.com wrote: On Tue, Apr 27, 2010 at 2:42 PM, Michal M mich.mier...@googlemail.com wrote: On 27 Kwi, 23:21, Duncan Booth duncan.bo...@invalid.invalid wrote: Michal M

Re: How to check what is holding reference to object

2010-04-28 Thread Almar Klein
On 27 April 2010 23:08, Chris Rebert c...@rebertia.com wrote: On Tue, Apr 27, 2010 at 1:45 PM, Michal M mich.mier...@googlemail.com wrote: I've just found out that one of objects is not destroyed when it should be. This means that something was holding reference to this object or part of

Re: How to check what is holding reference to object

2010-04-28 Thread Christian Heimes
Almar Klein wrote: Ah, it does exist! I wish I knew that two months ago, it would've saved me some precious time ;) The trick works only for objects that are tracked by CPython's garbage collector. Simple and non-containerish objects like str, int, unicode and some other types aren't tracked

Re: How to check what is holding reference to object

2010-04-27 Thread Xavier Ho
Michal, May I ask why do you care about the object's management? Let Python worry about that. What's your use case? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to check what is holding reference to object

2010-04-27 Thread Almar Klein
I've just found out that one of objects is not destroyed when it should be. This means that something was holding reference to this object or part of it (i.e. method). Is there any way to check what holds that reference? I am unable to do that just looking to the code or debugging it because

Re: How to check what is holding reference to object

2010-04-27 Thread Chris Rebert
On Tue, Apr 27, 2010 at 1:45 PM, Michal M mich.mier...@googlemail.com wrote: I've just found out that one of objects is not destroyed when it should be. This means that something was holding reference to this object or part of it (i.e. method). Is there any way to check what holds that

Re: How to check what is holding reference to object

2010-04-27 Thread Duncan Booth
Michal M mich.mier...@googlemail.com wrote: Hi I've just found out that one of objects is not destroyed when it should be. This means that something was holding reference to this object or part of it (i.e. method). Is there any way to check what holds that reference? I am unable to do that

Re: How to check what is holding reference to object

2010-04-27 Thread Michal M
On 27 Kwi, 23:21, Duncan Booth duncan.bo...@invalid.invalid wrote: Michal M mich.mier...@googlemail.com wrote: Hi I've just found out that one of objects is not destroyed when it should be. This means that something was holding reference to this object or part of it (i.e. method). Is

Re: How to check what is holding reference to object

2010-04-27 Thread Chris Rebert
On Tue, Apr 27, 2010 at 2:42 PM, Michal M mich.mier...@googlemail.com wrote: On 27 Kwi, 23:21, Duncan Booth duncan.bo...@invalid.invalid wrote: Michal M mich.mier...@googlemail.com wrote: I've just found out that one of objects is not destroyed when it should be. This means that something

Re: How to check what is holding reference to object

2010-04-27 Thread Chris Rebert
On Tue, Apr 27, 2010 at 2:58 PM, Chris Rebert c...@rebertia.com wrote: On Tue, Apr 27, 2010 at 2:42 PM, Michal M mich.mier...@googlemail.com wrote: On 27 Kwi, 23:21, Duncan Booth duncan.bo...@invalid.invalid wrote: Michal M mich.mier...@googlemail.com wrote: I've just found out that one of