Python C-API module exit handler - atexit equivalent?

I am using Python ver 2.6.4

There is a function that I have to call from the C library when my expansion module exits / unloads. What would be the equivalent of atexit for the C extension module?

+3
source share
1 answer

The function Py_AtExit()can be used to register up to 32 cleaning functions.

+4
source

Source: https://habr.com/ru/post/1728866/


All Articles