Getting the reference count
Just van Rossum
just at letterror.com
Sun Aug 27 05:47:55 EDT 2000
Makhno wrote:
>
> Is it possible to get the reference count of a PyObject* object?
> I'm surre it must be, but I can't see it documented anywhere.
>
> Something similar to Perl's SvREFCNT() Macro would be great.
sys.getrefcount(object)
Note that this always returns one more than the actual value, as
there's always an additional ref when inside sys.getrefcount().
Just
More information about the Python-list
mailing list