On Mon, Oct 20, 2008 at 6:52 AM, Lane Brooks <[EMAIL PROTECTED]> wrote: > > > Thanks for the great tip on sys.getrefcount(). I understand reference > counting a whole lot better now after playing with sys.getrefcount() > function.
For debugging purpose, and if you need it in C, you can use the member a->ob_refcount where a is any valid pointer to a PyObject. This is more or less the equivalent of sys.getrefcount, but at the C level (without the +1). The struct member ob_refcount is private and should not be depended on in "real" code, but I personally like using it when I am not sure about ref counting. cheers, David _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion