Re: Refcount problem in ceval.c

2008-09-11 Thread Berthold Höllmann
Christian Heimes <[EMAIL PROTECTED]> writes: > Berthold Höllmann wrote: >> Is there any "common" reason to for such a strange object on the command >> stack, or is it more likely that any of my extension modules is causing >> havoc? > > It's very likely that your extension has a reference counting

Re: Refcount problem in ceval.c

2008-09-10 Thread Christian Heimes
Berthold Höllmann wrote: Is there any "common" reason to for such a strange object on the command stack, or is it more likely that any of my extension modules is causing havoc? It's very likely that your extension has a reference counting bug. It looks like you are either missing a Py_INCREF o

Re: refcount

2008-01-30 Thread Sion Arrowsmith
Benjamin <[EMAIL PROTECTED]> wrote: >> [ help(sys.getrefcount) says: ] >> [ ... ] The count returned is generally >> one higher than you might expect, because it includes the (temporary) >> reference as an argument to getrefcount(). >Are there any cases when it wouldn't? When the temporary refer

Re: refcount

2008-01-29 Thread Mel
Benjamin wrote: > On Jan 29, 5:46 am, Christian Heimes <[EMAIL PROTECTED]> wrote: >> Simon Pickles wrote: >>> Hi, >>> Is is possible to access the refcount for an object? >>> Ideally, I am looking to see if I have a refcount of 1 before calling del >> Help on built-in function getrefcount in module

Re: refcount

2008-01-29 Thread Benjamin
On Jan 29, 5:46 am, Christian Heimes <[EMAIL PROTECTED]> wrote: > Simon Pickles wrote: > > Hi, > > > Is is possible to access the refcount for an object? > > > Ideally, I am looking to see if I have a refcount of 1 before calling del > > Help on built-in function getrefcount in module sys: > > getr

Re: refcount

2008-01-29 Thread Christian Heimes
Simon Pickles wrote: > Hi, > > Is is possible to access the refcount for an object? > > Ideally, I am looking to see if I have a refcount of 1 before calling del Help on built-in function getrefcount in module sys: getrefcount(...) getrefcount(object) -> integer Return the reference count

Re: refcount

2008-01-29 Thread Duncan Booth
Simon Pickles <[EMAIL PROTECTED]> wrote: > Is is possible to access the refcount for an object? >>> import sys >>> sys.getrefcount(42) 6 > Ideally, I am looking to see if I have a refcount of 1 before calling del That's a pointless exercise: you probably don't understand what del does. All that