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
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
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
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
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
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
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