[pypy-dev] swig + pypy - object reference counting

Amaury Forgeot d'Arc amauryfa at gmail.com
Wed Sep 28 11:58:06 CEST 2011

2011/9/28 Alex Pyattaev <alex.pyattaev at gmail.com>

>      Py_XINCREF(resultobj);

What is this call doing? It should not be necessary, since you called
This may explain why it does not crash with CPython: the tuple object always
leaks but happens to keep the necessary reference to the global object.
(PyPy does not use refcounting in tuples, so behaviour differs)

If you fix the tuple leak, you will certainly see that CPython needs the
additional  Py_XINCREF($1->node_tx) as well...

Amaury Forgeot d'Arc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20110928/ac135044/attachment.html>

More information about the pypy-dev mailing list