Python C API: How to debug reference leak?

dl l ldlchina at gmail.com
Tue Sep 27 03:47:46 EDT 2016


Thanks for reply. Is there any function in C to get the reference objects
of a object? I want to debug where are referencing the object.

2016-09-27 15:01 GMT+08:00 dieter <dieter at handshake.de>:

> 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.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list