Is this a leaker?
Arinté
n at n.com
Fri Jun 30 10:26:59 EDT 2000
> This depends on how you document your function :) If you document it as
> returning a borrowed reference, the caller should not DECREF the returned
> value. If you document it as returning a new reference, it should take
care
> of the DECREF itself. In this case, it doesn't make sense to return a
> borrowed reference: If you do a DECREF on the fresly-created
> Py_BuildValue()-object, it'll end up destroyed !
I was speaking of returns to python scripts. All of the 'return
Py_BuildValue()' return to python scripts. I don't have to decref in py
script files do I?
More information about the Python-list
mailing list