On Fri, Dec 14, 2012 at 3:21 AM, Robert Steckroth firstname.lastname@example.org wrote:
Does the below statement have a memory leak?
if ( PyObject_Compare(update_var, Py_False)
Do I need to assign the Py_False first and DECREF it, or is the above snippet ok alone.
The python api docs will often say if they use/steal references. If your not sure you could just printf("%d\n", Py_REFCNT(Py_False)); before and after calling.