Re: How to check what is holding reference to object

2010-05-05 Thread Marius Gedminas
On Apr 27, 11:45 pm, Michal M 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 unable to do that just look

Re: How to check what is holding reference to object

2010-05-05 Thread Marius Gedminas
On Apr 28, 3:59 pm, Christian Heimes 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 >>> import gc >>>

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-28 Thread Almar Klein
On 27 April 2010 23:08, Chris Rebert wrote: > On Tue, Apr 27, 2010 at 1:45 PM, Michal M > 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

Re: How to check what is holding reference to object

2010-04-28 Thread Michal M
On Apr 28, 12:02 am, Chris Rebert wrote: > On Tue, Apr 27, 2010 at 2:58 PM, Chris Rebert wrote: > > On Tue, Apr 27, 2010 at 2:42 PM, Michal M > > wrote: > >> On 27 Kwi, 23:21, Duncan Booth wrote: > >>> Michal M wrote: > >>> > I've just found out that one of objects is not destroyed when it >

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 wrote: > On Tue, Apr 27, 2010 at 2:42 PM, Michal M wrote: >> On 27 Kwi, 23:21, Duncan Booth wrote: >>> Michal M wrote: >>> > I've just found out that one of objects is not destroyed when it >>> > should be. This means that something was holding refe

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 wrote: > On 27 Kwi, 23:21, Duncan Booth wrote: >> Michal M 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 th

Re: How to check what is holding reference to object

2010-04-27 Thread Michal M
On 27 Kwi, 23:21, Duncan Booth wrote: > Michal M 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 refere

Re: How to check what is holding reference to object

2010-04-27 Thread Duncan Booth
Michal M 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 just looking to the c

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 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 unable to do th

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 beca

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

How to check what is holding reference to object

2010-04-27 Thread Michal M
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 just looking to the code or debugging it because it