Python C API: How to debug reference leak?

dieter dieter at handshake.de
Tue Sep 27 03:01:55 EDT 2016


dl l <ldlchina at gmail.com> writes:
> I want to check the references of an object. Any way to get the references
> of an object with Python C API? Like: gc.get_referrs(), is there similar
> API in C lib?

"gc" is a module. You can import and access modules from the C API.
Thus, you can use "gc.get_referers" from "C" code.




More information about the Python-list mailing list