[capi-sig] Does Py_False or Py_True need de-referencing if used in a PyObject_Compare?

Robert Steckroth robertsteckroth at gmail.com
Thu Dec 13 17:57:24 CET 2012


Well, from what I have gathered, the reference count does not need to be
maintain as far as PyBool objects go.
It seem to be fine even if the object is set from a argument. Hmmm...


On Thu, Dec 13, 2012 at 11:21 AM, Robert Steckroth <
robertsteckroth at gmail.com> 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.
>
> --
> Bust0ut, Surgemcgee: Systems Engineer ---
> surgemcgee.com
> Django_Teamplate3d
>



-- 
Bust0ut, Surgemcgee: Systems Engineer ---
surgemcgee.com
Django_Teamplate3d


More information about the capi-sig mailing list