Any way to get the references of an object with Python C API?
<p>I want to check the references of an PyObject in C++. Any way to get the references of an object with Python C API? Like: gc.get_referrers(), is there similar API in C lib?</p>

<p>I'm using Python C APIs to run Python scripts. So I want to debug ref leak problem in my C++ code.</p>

<p>A similar question has been answered here: <a href="http://stackoverflow.com/questions/26134455/how-to-get-reference-count-of-a-pyobject">How to get reference count of a PyObject?</a></p>

python c